Reputation: 1
the following is my xml file.what will be XSD structure for the following xml?
<sell>
<product>
<description></description>
<details>
<name></name>
<cost></cost>
</details>
</product>
</sell>
Upvotes: 0
Views: 31
Reputation: 180787
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="sell">
<xs:complexType>
<xs:sequence>
<xs:element name="product">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="description"/>
<xs:element name="details">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="name"/>
<xs:element type="xs:string" name="cost"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Obtained from http://www.freeformatter.com/xsd-generator.html
Upvotes: 2