For a more sophisticated approach, I highly recommend Castor.
Erik
Tim Colson wrote:
I found these two articles to be interesting reads on a simple way to
unmarshal data from XML into java objects using the Jakarta Digester.
Seems a little bit like a lightweight one-way read-only JAXB. :-)
Cheers,
Timo
-------------------------------------------
http://www.onjava.com/lpt/a/2746
Learning and Using Jakarta Digester
by Philipp K. Janert, Ph.D.
10/23/2002 Turning an XML document into a corresponding hierarchy of Java bean
objects is a fairly common task. In a previous article, I described how
to accomplish this using the standard SAX and DOM APIs.
Although powerful and flexible, both APIs are, in effect, too low-level
for the specific task at hand. Furthermore, the unmarshalling procedure
itself requires a fair amount of coding: a parse-stack must be
maintained when using SAX, and the DOM-tree must be navigated when using
DOM.
This is where the Apache Jakarta Commons Digester framework comes in.
...
------------------------------------------------
http://www.javaworld.com/javaworld/jw-10-2002/jw-1025-opensourceprofile.
html
Simplify XML file processing with the Jakarta Commons Digester How to use Digester to parse XML configuration files
Summary
The Jakarta Commons Digester is a popular open source utility that
facilitates XML file processing. This article provides an overview of
Digester, followed by an example that uses Digester to parse an XML
configuration file. (1,200 words; October 25, 2002) By Erik Swenson
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
