[xsd-users] Is it possible using XSD to do this?

Anpao Chou ac22750085 at yahoo.com
Fri Aug 22 14:04:54 EDT 2008


Hi:

     I have recently upgraded a schema file, is it possible
     to use XSD tool to generate the new xml files (based on the
     new schema) from the old xml files (based on the old schema)? 
     If so, any clues are appreciated. 
     
     For example:
     
     Old schema file try.xsd:
     
     <?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="try">
        <xs:complexType>
            <xs:sequence>
            <xs:element name="try_1" type="xs:string"/>
            <xs:element name="try_3" type="xs:string"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>


     Added a new interger element try_2 before the element try_3 to the 
     new schema file newtry.xsd
     
     I know I can use strictly only Xerces calls to insert the element try_2
     with the default value before the element try_3, but was wondering 
     is there a better way to handle the problem of multiple upgrades of
     a complicated schema file then convert the old xml files to the new 
     schema format? 
      
     Is it possible using XSD to do this, again, any clues are appreciated. 
     
Thanks and Best Regards,
Anpao     


      


More information about the xsd-users mailing list