sample on how to generate XML skeleton from XSD

Discussion in 'XML' started by akira, May 15, 2006.

  1. akira

    akira Guest

    Hello I have generated an XSD file with XMLSPY from XML file which give
    me all the elem structure

    I would like to generate the XML skeleton of this associated to this
    XSD file. Constraint is
    each elem of XSD
    generate
    <_element>
    <_name>
    </_name>
    <_value>
    </_value>
    </_element>

    eg :
    XSD:
    ====
    <xs:element name="_pointList">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="_entries"/>
    <xs:element ref="_element" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="_element">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="_x"/>
    <xs:element ref="_y"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>

    XML requested :
    ===========
    <_element>
    <_name>_pointList</_name>
    <_value>
    <_entries>1</_entries>
    <_element>
    <_name>_pointList_element</_name>
    <_value>
    <_entries>2</_entries>
    <_element>
    <_name>_x</_name>
    <_value>
    <_entries>0</_entries>
    </_value>
    </_element>
    <_element>
    <_name>_y</_name>
    <_value>
    <_entries>0</_entries>
    </_value>
    </_element>
    </_value>
    </_element>
    </_value>
    </_element>

    Thx
    akira, May 15, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    600
    anonymous
    Feb 4, 2005
  2. Nettar
    Replies:
    1
    Views:
    851
    Joe Kesselman
    Jul 21, 2006
  3. Baron Samedi
    Replies:
    0
    Views:
    376
    Baron Samedi
    May 15, 2007
  4. Aardalath
    Replies:
    4
    Views:
    403
    Aardalath
    Jan 27, 2009
  5. Replies:
    0
    Views:
    117
Loading...

Share This Page