I'm looking for a Java library that would allow me to marshal XML to a Java object tree, and vice versa. There are plenty of libraries that would allow me to bind XML to JavaBeans generated by some code generation tool, however, I don't need those (JAXB, JiBX, Castor and so on).
What I need is a tool which would consume a schema file and an xml file and then return a combination of Map
s, List
s and Object
s in a manner similar to Jackson's simple data binding (when it is possible, of course). Jackson is intended for JSON, not for XML; and it lacks the ability to take a schema file in account (because JSON Schema is too immature at the moment).
Can I adapt some existing tools to solve my problem, or should I roll out my own solution with DOM and XSOM?