Java XML Tutorial - Java JAXP Intro

成年女人免费毛片视频-伊人aV 影 伊人網a V在線 V The Java API for XML Processing (JAXP) is for processing XML data in the Java.

成年女人免费毛片视频-伊人aV 影 伊人網a V在線 V JAXP contains standards Simple API for XML Parsing (SAX), Document Object Model (DOM), and the Streaming API for XML (StAX) standard.

成年女人免费毛片视频-伊人aV 影 伊人網a V在線 V JAXP supports the Extensible Stylesheet Language Transformations (XSLT) standard, and we can use it to convert the XML documents to other formats, such as HTML.

Packages Overview

成年女人免费毛片视频-伊人aV 影 伊人網a V在線 V The Java SAX and DOM APIs are defined as follows:

javax.xml.parsersThe JAXP APIs provide an interface for various SAX and DOM parsers.
org.w3c.domDOM related classes
org.xml.saxSAX APIs.
javax.xml.transformXSLT APIs that transform XML into other forms.
javax.xml.streamStAX-specific transformation APIs.


成年女人免费毛片视频-伊人aV 影 伊人網a V在線 V The Simple API for XML (SAX) is the event-driven, serial-access parser. It processes the XML document element-by-element.

The SAX API is often used as data filters that do not require an in-memory representation of the XML data.


The DOM API builds a tree structure out of the XML document.

We can use the DOM API to manipulate the hierarchy of XML objects.

成年女人免费毛片视频-伊人aV 影 伊人網a V在線 V The entire XML tree is stored in memory by DOM API. It would use more memory than SAX parser


We can use the XSLT APIs defined in javax.xml.transform to write XML data to a file or convert the XML document into other forms, such as HTML or PDF.


The StAX APIs defined in provide a streaming based, event-driven, pull-parsing API for reading and writing XML documents using Java.

StAX is a simpler than SAX and consumes less memory than DOM.