Apache's XMLBeans creates POJOs (beans) that are actually facade objects, backed by the XML DOM tree. This means that bean.setName("Jeff") updates the backing DOM. I don't know if this is what you are looking for, but I've been using XMLBeans extensively on one of my current projects and it was just what I was looking for. [ November 10, 2005: Message edited by: Jeff Albrechtsen ]
There is no emoticon for what I am feeling!
Joined: Nov 07, 2005
Jeff, thanks for your reply.
All I need to do convert the XML files into POJO's. These POJO will be serialized and transmitted to another application. Is XML Beans too heavy to do something as lightweight as this?
Most of the products I've seen for Java-XML mapping require you to produce a schema for the XML you plan to make into Java objects, or something equivalent. So if you didn't have arbitrary XML documents in mind, maybe one of those products would work for you.
I was going to suggest that the standard Java object which you can convert XML into is an org.w3c.dom.Document object, but that doesn't have to be Serializable so it might not work. But if you're going to send it to another application, why not just send the XML document itself and let the other application parse it?