XML Parsing With SAX and Xerces (part 2) (
Page 1 of 5 )
The first part of this article demonstrated the basics of the Xerces XML parser,
explaining how it could be used to process XML documents in a non-Web environment.
This concluding section closes the circle, taking everything you've learned so
far and demonstrating how it can be applied to create dynamic Web pages from static
XML documents with Xerces.In the first part of this article, I introduced you to the Xerces XML parser,
explaining how it could be used to parse XML documents using an event-driven approach
called SAX. I also demonstrated how the parser worked by using it in a couple
of simple Java programs, and explained some of the interfaces and callbacks available
in the API.
Now, writing a Java program to parse an XML document is all well and good. However,
it's not really all that useful if you're a Web developer and your primary goal
is the dynamic generation of Web pages from an XML file. And so, this concluding
part takes everything you learned last time and tosses it out into the wild and
wacky world of the Web, demonstrating clearly how Java, JSP, Xerces and XML can
be combined to create simple, real-world Web applications. Take a look!