Java packages for XML
javax.xml.parsers contains
- SAXParserFactory gives you a SAX parser
- DocumentBuilderFactory gives you a DocumentBuilder,
- The Document Builder can process XML to produce a Document object or create an empty Document object..
The factory API’s allow you to plug-in various vendor parsers at run-time without changing the code. For example, you can load
- com.ibm.xml.parser (IBM’s parser)
- com.ms.xml.parser (Microsoft’s parser)
- com.sun.xml.parser or com.sun.xml.ValidatingParser
- parsers can validate to various degrees depending on whether they process all external entities