XML Development in Java
It's All in the Beans
By Maneesh Sahu
Java is witnessing an increased integration with XML in enterprise application
development. XML data is being processed within Java programs to produce data
stores, messaging mechanisms, and complex views. (Refer to the online article
"XML, Java, and the Future of the Web" by Jon Bosak at XML.com.)
When processing XML in Java, there's a set of tasks that is common to any
application. First, we'll look at building an XML application from scratch
to see what's required to process XML documents in a Java program. Then we'll
use a set of functions that is available as XML JavaBeans. In fact, XML JavaBeans
not only make it easier for programmers to write applications, they also make
it possible for nonprogrammers to assemble nontrivial XML applications. (See
the box titled " Extending the Benefits of XML JavaBeans.")
Our sample application is a simple bookmark viewer. We'll be using IBM's
XML4J parser as well as a set of XML JavaBeans developed by IBM. However,
other parsers can be used and, indeed, knowledgeable Java programmers can
write their own XML JavaBeans.
Developing XML Applications
Regardless of the development environment, there are three steps to writing
an XML application.<>