The Java API for XML Parsing (JAXP)

As stated earlier, there are two common ways for a computer program to ingest and use an XML document: either as a stream of SAX events or as a Document Object Model (DOM). There are many implementations of these two de facto standards available from numerous vendors; however, there was no way to write code that would work with all vendors'implementa tions in a plug-and-play manner until now. That is the problem that the Java Community process set out to solve with the Java API for XML Parsing. The package javax.xml defines two Factory and Wrapper class combinations—one for SAX Parsers and one for Document (Object Model) Builders. The following are the four classes in the javax.xml.parser:

  • SAXParserFactory ...

Get XML Development with Java™ 2 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.