Parsers and Programs

An XML parser is a library or API that reads raw XML text, checks it for well-formedness (and, optionally, validity against a schema), and exposes its content and structure to an application. Parsers differ mainly in their processing model: whether the whole document is built into memory as a navigable tree, or the document is streamed to the application piece by piece.

This chapter surveys the parsing models and parser implementations commonly encountered when working with XML: