locked
xsd to xml RRS feed

  • Question

  • hi all,

    this is my xsd

    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="car">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:enumeration value="Audi"/>
    <xs:enumeration value="Golf"/>
    <xs:enumeration value="BMW"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    </xs:schema>

    from XML Schema Explorer i right click on <>Car  and click on generate sample xml file option there its not gave Audi, Golf and BMW instaed its showing first element as "Audi", like below

    <?xml version="1.0" encoding="utf-8"?>
    <car>Audi</car>

    why its not showing all 3 data?, wat to do come all 3 data?

    Thanks In Advance, Jeyaseelan

    Tuesday, July 17, 2012 9:27 AM

Answers

  • That is the XSD enumeration so the value can be one Audi, Golf or BMW. Audi is selected because it is the first in schema. Are you sure this is not what you want to do?
    Tuesday, July 17, 2012 2:31 PM