|
Home TOC |
|
The JAXP APIs
The main JAXP APIs are defined in the
javax.xml.parserspackage. That package contains two vendor-neutral factory classes:SAXParserFactoryandDocumentBuilderFactorythat give you aSAXParserand aDocumentBuilder, respectively. TheDocumentBuilder, in turn, creates DOM-compliantDocumentobject.The factory APIs give you the ability to plug in an XML implementation offered by another vendor without changing your source code. The implementation you get depends on the setting of the
javax.xml.parsers.SAXParserFactoryandjavax.xml.parsers.DocumentBuilderFactorysystem properties. The default values (unless overridden at runtime) point to the reference implementation.The remainder of this section shows how the different JAXP APIs work when you write an application.
|
Home TOC |
|