Summary

JAXP represents the bundle of classes that we use to parse and transform XML documents. In this chapter we took a look at the JAXP package, specifically at the classes that allow us to parse XML documents.

We found that there are two types of XML parsers available in the JDK: the Document Object Model (DOM) parser and the Simple API for XML (SAX) parser. We first examined the parsing of a document using DOM and then examined how to perform parsing using SAX.

We often have to examine an XML document and retrieve specific values. Rather than scan the entire document for an XML element and its corresponding value, it is easier to provide this capability through a convenience method. Unfortunately, the parsers provided with the JDK do not ...

Get J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.