First page Back Continue Last page Overview Graphics
Item 29: Always use a parser
Can’t use regular expressions:
- Detecting encoding
- Comments and processing instructions that contain tags
- CDATA sections
- Unexpected placement of spaces and line breaks within tags
- Default attribute values
- Character and entity references
- Malformed documents
- Internal DTD Subset
Why not?
- Unfamiliarity with parsers
- Too slow