Versioning is a very complicated issue, however in your case, you may be able to make use of xsi:type attribute?

<root xsi:type="MyRoot1"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
   ...
</root>

--Keith


Gilles Maurice wrote:
What is the best way to support marshaling different versions of an XML file using Castor XML ?

The simplistic solution is to have the version number ias part of the root element name e.g. <root1>. When another version of the xml file is created we can call the root name <root2> and then we can put both root names in the mapping file...

<class name="MyRoot1"><map-to xml="root1"/>...
<class name="MyRoot2"><map-to xml="root2"/>...

But having a version number in the root name kinda sucks. Does anyone have a better solution?

BTW... Castor XML ROCKS!!!


------------------------------------------------------------------------

----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user



----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user

Reply via email to