UP | HOME

NameCheck of XML Validation

The beautiful part is build up a array with size 216, each value is 8bits, each bit indicate something like whether current character could be start of name, valid name.
For instance, number 4 is at 0x34 (decimal 52), so flags[52] = 0x0b (00001100), those 8bits 0/1 are indication.

Chapter 5 of <beautiful code> has the detail.