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, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access