JAXP

Java API for XML (JAXP) – XPath

XPath and JAXP XPath is a language for querying XML Documents. Using a certain syntax XPath can retrieve specific node or list of nodes from the XML Document. This tutorial does not explain XPath syntax but shows how to use JAXP to implement XPath querying. The Steps for XPath querying are: Obtain the XPath class […]

Java API for XML (JAXP) – XSLT Transformation

XSLT Introduction XSLT is the language for transforming XML documents into other documents such as HTML or other XML documents. It is part of the XSL or XML Schema language. The input to the transformation is a source tree and the output is the result tree. It uses predefined templates to match parts of the […]

Java API for XML (JAXP) – Validation

Validating XML using DTD or XSD An XML document is considered ‘well-formed’ if it follows the normal rules of XML. i.e. all tags are closed properly etc. On the other hand, an XML is considered valid if it follows the rules specified in the DTD or XSD. In the example below we look at validating […]

Java API for XML (JAXP) – StAX

StAX API in JAXP StAX stands for Streaming API for XML. In the earlier tutorials we have seen DOM (Document Object Model) where a Document tree is created out of the xml and the entire document tree is stored in memory. We have also see the SAX (Simple API for XML) API wherein the parser […]

Java API for XML (JAXP) – SAX

What is SAX SAX stands for Simple API for XML. It is an event driven method of accessing elements of an XML document. The elements are accessed serially. The API fire events for each type of data that it finds. The user provides a Handler that can handle the various kinds of events thrown by […]

Java API for XML (JAXP) – DOM

What is DOM DOM is an Object representation of an XML, HTML or XHTML document. In this tutorial we will be dealing with only XML. DOM represents the XML as a Document tree. JAXP provides API for DOM implementation in Java. It also provides parsing interface which can be used to plugin different parsers (JAXP […]

Java API for XML (JAXP) – Introduction

What is Java API for XML (JAXP) JAXP is the Java reference implementation for parsing, transforming, validating and querying XML documents. In other words using the JAXP API you can Parse an XML document using the Document Object Model (DOM) representation of the XML document – JAXP provides the classes that form the DOM Model. […]

Scroll to top
Bitnami