What is the JAXP

What is JAXP

The JAX-WS API automatically manages almost all XML processing needed to implement Web services in J2EE. But sometimes it is required to work directly with XML documents. In this situation, JAXP appears on the stage.

The JAXP is the Java API for processing XML data with applications written in the Java programming language. The JAXP gives the possibility to validate, parse, and transform XML using several different APIs. It is easy to use and vendor-neutral. The JAXP doesn't add new functional capabilities to Java language or XML processing, instead, it facilitates the usage of DOM and SAX with a so-called pluggability layer.

JAXP also gives the possibility to work with the Extensible Stylesheet Language Transformations (XSLT) standard, giving the control over the presentation of the data and enabling you to convert the data to other XML documents or to other formats, such as HTML. JAXP provides namespace support and implements the Streaming API for XML (StAX) standard as well.

The main JAXP APIs are defined in the javax.xml.parsers package. The next four articles describe each part of JAXP API and show how to parse the XML file. DOM and SAX subsections don't contain a detailed description of these parsers, but rather explain how to use them with JAXP.

  1. SAX Parser
  2. StAX Parser
  3. XSLT
  4. Document Object Model
Trustpilot
Trustpilot
Comments