AI-generated Key Takeaways
-
The javax.xml.parsers package provides classes for parsing XML documents using DOM or SAX.
-
DocumentBuilder and DocumentBuilderFactory are used for obtaining DOM Document instances.
-
SAXParser and SAXParserFactory are used for obtaining SAX-based parsers for XML documents.
-
ParserConfigurationException signals serious configuration errors, while FactoryConfigurationError indicates configuration problems with Parser Factories.
Classes
DocumentBuilder | Defines the API to obtain DOM Document instances from an XML document. |
DocumentBuilderFactory | Defines a factory API that enables applications to obtain a parser that produces DOM object trees from XML documents. |
SAXParser | Defines the API that wraps an XMLReader
implementation class. |
SAXParserFactory | Defines a factory API that enables applications to configure and obtain a SAX based parser to parse XML documents. |
Exceptions
ParserConfigurationException | Indicates a serious configuration error. |
Errors
FactoryConfigurationError | Thrown when a problem with configuration with the Parser Factories exists. |