XML Parsers

To avoid the difficulties inherent in parsing raw XML input, almost all programs that need to process XML documents rely on an XML parser to actually read the document. The parser is a software library (in Java, it's a class) that reads the XML document and checks it for well-formedness. Client applications use method calls defined in the parser API to receive or request information that the parser retrieves from the XML document.

The parser shields the client application from all of the complex and not particularly relevant details of XML, including

  • Transcoding the document to Unicode

  • Assembling the different parts of a document divided into multiple entities

  • Resolving character references

  • Understanding CDATA sections

  • Checking hundreds ...

Get Processing XML with Java™: A Guide to SAX, DOM, JDOM, JAXP, and TrAX now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.