Java XML Programming

Java and XML are two of the most successful technologies of the last decade. The fact that they naturally co-exist in software applications is no coincidence. The combination of the simplicity and flexibility of XML and the functionality of Java makes them a perfect team. Recently, XML has been used in data messaging underpinning distributed applications.

This course provides thorough coverage of how to manipulate and create XML content by using Java APIs.


3 days



  • At least 6 months programming experience
  • Familiarity with XML document structure

What you'll learn

  • Manipulating XML data using SAX, StAX, and DOM
  • Serializing Java objects to XML using JAXB
  • Locating XML content using XPath
  • Transforming XML content using XSLT
  • Defining and calling SOAP Web services
  • Defining and using REST Web services

Course details

XML Essentials

  • XML document anatomy
  • Validating XML documents using DTD and XSD
  • Transforming XML documents using XSLT

Working with the Simple API for XML (SAX)

  • XML programming techniques
  • Overview of SAX
  • Handling elements, attributes, and content
  • Error handling and validation
  • SAX and the Java API for XML Processing (JAXP)

Working with the Streaming API for XML (StAX)

  • Overview of StAX
  • Reading a document using StAX
  • Creating a new document using StAX

Working with the Document Object Model (DOM)

  • Overview of DOM
  • Navigating a document
  • Modifying content
  • Error handling and validation
  • DOM and the Java API for XML Processing (JAXP)

Using Java Architecture for XML Binding (JAXB)

  • Overview of JAXB
  • Simple marshalling
  • Custom marshalling
  • Unmarshalling

Java and XPath

  • Overview of XPath
  • Using XPath in Java
  • Filtering results
  • Using XPath functions and operators
  • Using XPath 2.0 features

Java and XSLT

  • Overview of XSLT
  • Using XSLT in Java
  • Defining overloaded template rules
  • Loops and decision making in XSLT
  • Sorting results
  • Defining and calling named template rules
  • Parameterizing template rules
  • Using XSLT 2.0 and 3.0 features

SOAP Web Services

  • Overview of SOAP Web services
  • Defining and calling SOAP Web services in Java
  • Using Java-WS
  • Passing complex types to and from a SOAP Web service

REST Web Services

  • Overview of REST Web services
  • Implementing REST Web services in Java
  • Using Java-RS
  • Working with JSON data