Inside an XML Parser
As noted previously, XML parsers come in two flavors: standard, which merely checks that a document is well-formed, and validating, which matches the document to its DTD.
Parsers also come in two basic types: those that form a parse tree and those that merely parse a document as a flat structure. The first type is by far the most common. Although it is not quite as fast as the second type, it is far more versatile. More importantly, it is extensible.
A Brief History Lesson
Here is a brief history lesson on the importance of planning for extensibility…
The Netscape HTML browser was built on the second type of parser, which parses a document as a flat structure. This presented no problems while HTML was in its infancy. However, ...
Get XML Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.