Java API for XML Processing: Difference between revisions

Content deleted Content added
m Disambiguation link repair - You can help! and minor fixes using AWB
fix section levels, as per WP:MOS
Line 8:
In addition to the parsing interfaces, the API provides an [[XSLT]] interface to provide data and structural transformations on an XML document. JAXP was developed under the [[Java Community Process]] as JSR 5 (JAXP 1.0) and JSR 63 (JAXP 1.1 and 1.2). [[J2SE]] 1.4 is the first version of Java that comes with an implementation of JAXP. [[As of 2006]], the current version of JAXP is version 1.2 and JAXP 1.3 is being developed under JSR 206.
 
=== 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 using the classes modeling the concepts found in the [http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113 Document Object Model(DOM) Level 2 Core Specification].
Line 18:
Refer to the [[Javadoc]] documentation of the [[Java package]] {{Javadoc:SE|package=org.w3c.dom|org/w3c/dom}} for a complete list of node types.
 
=== SAX interface ===
 
The SAX parser is called the {{Javadoc:SE|javax/xml/parsers|SAXParser}} and is created by the {{Javadoc:SE|package=javax.xml.parsers|javax/xml/parsers|SAXParserFactory}}. Unlike the DOM parser, the SAX parser does not create an in-memory representation of the XML document and so is faster and uses less memory. Instead, the SAX parser informs clients of the XML document structure by invoking callbacks, that is, by invoking methods on a {{Javadoc:SE|package=org.xml.sax.helpers|org/xml/sax/helpers|DefaultHandler}} instance provided to the parser.
Line 29:
Clients provide a subclass of the <code>DefaultHandler</code> that overrides these methods and processes the data. This may involve storing the data into a database or writing it out to a stream.
 
=== XSLT interface ===
 
The '''X'''ML '''S'''tylesheet '''L'''anguage for '''T'''ransformations, or '''[[XSLT]]''', allows for conversion of an XML document into other forms of data.
 
=== External links ===
 
* See [http://java.sun.com/webservices/jaxp/ Sun's JAXP product description]