[jdom-interest] instantiate java object with data from xml doc

Brett McLaughlin brett at newInstance.com
Mon Sep 17 11:59:01 PDT 2001


on 9/17/01 12:57 PM, Rhodes, Phillip C. at Phillip.Rhodes at alcoa.com wrote:

> I have a Java class, and a XML file.  I know how I can parse my xml document
> and manually set the members of my Java class to the values in my xml file.
> 
> But there must be a simpler way of doing this!  Perhaps define a XML to Java
> mapping file, and use this to create Java objects.   Has anyone seen this.
> SOAP sort of does this, but it's emphasis is on the transport of the object,
> this is at a lower level.

You want XML data binding. Sun has JAXb at http://java.sun.com/xml, but it's
in VERY early access, and is really not that ready for real use. Try out
Zeus, which I chair, at http://zeus.enhydra.org. I'm doing a major revamp
right now, actually.

Thanks,
-- 
Brett Mclaughlin       <http://www.newInstance.com>
Lutris Technologies    <http://www.lutris.com>
Author, "Java and XML" <http://www.oreilly.com/catalog/javaxml2>





More information about the jdom-interest mailing list