I want to be able to expose an object that represents an XML file to my users. This can be done with many libraries (xmlBeans, JAXB...) and it's all well and fine until I have to support different versions of that XML file (evolving schema problem) for backward compatibility.
I want this to be completely transparent to my users, meaning it is my system that needs to decide which which version of XML file needs to be used at a certain point in time.
Here's a short pseudo code of what I want to achieve:
public VersionIndependantObject getVersionSpecificXmlBindedObject() {
//Determening XSD version and binding XML file to JAVA object
return javaObject;
}
VersionIndependantObject - this is an object representation of XML file found on the system at that time (it could be v1,v2...).
Is there a way of doing with one of an already existing libraries for XML -> Java Object binding?