Java API for XML Processing
Appearance
The Java API for XML Processing', or JAXP, is one of the Java XML programming APIs. It provides the capability of validating and parsing of XML documents. The two basic models the API provides for parsing XML documents are:
- Simple API for XML Parsing or SAX interface
- Document Object Model or DOM interface
In addition to the parsing interfaces, the API provides an XSLT interface to provide data and structural transformations on an XML document.
DOM interface
The DOM interface is perhaps the easiest to understand. It parses an entire XML document and constructs a complete in-memory representation of the document. The DocumentBuilder interface returns a java object, called a Document, that contains nodes representing the elements in the XML document.
SAX interface
The SAX interface