O'Reilly logo

Java and XML by Brett McLaughlin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Traversing XML

In the last chapter, we learned how to create stylesheets for our XML documents, beginning our section on XSL. In this chapter, we complete that discussion by taking a detailed look at how our document and stylesheet are processed and transformed into output. As in our previous pairs of chapters, this chapter gives you the Java application of the XML language structures we just learned about. We will look at Java XSLT processors, Java APIs for handling XML input in tree formats, and how these APIs differ from the SAX APIs we have already examined.

To begin this chapter, we take a look at how to make the transformations dangled in front of you throughout the last chapter actually occur on your own local machine. This should give you a “virtual playground” where you can experiment with all the various XSL and XSLT constructs on your own, as well as adding more complex formatting to the stylesheet we created last chapter. It will also begin our closer look into how an XSLT processor works. We then complement our view of a processor’s output with a detailed look at the type of input it expects, and the format of this input. This leads us into a first look at the Document Object Model (DOM), an alternative to using SAX for getting to XML data. Finally, we will begin to move back a step from parsers, processors, and APIs, and look at how to put an XML application together. This will set the tone for the rest of the book, as we take a more topical approach on various ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required