Originally posted by Richard Butterwood: What is the best way to get XML into a POJO? This POJO will then be serialized and transported to a different machine. I need something lightweight. XML Beans looks like a lot of work for what I want.
I may have been the person who recommended XMLBeans in another thread. you should play around with them a bit before concluding that they are "a lot of work". It take one line, for instances, to parse XML and create a bean:
On the other hand, these bean objects are not Serializable, because that is not what they're about. They are lightweight facade objects backed by the XML DOM tree.
In any case, if you are transporting data to another machine, isn't that a good opportunity to use XML itself? Why use Java serialization for that?