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 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.