Skip to main content

Data Formats ( XML & JSON ) XML AND JSON | Generate XSD For Mobile Store

 

Generate XSD For Mobile Store

<?xml version="1.0" encoding="UTF-8"?>

<mobilestore>

<mobile>

<brand>Nokia</brand>

<os>Symbian</os>

<model>C6</model>

<ram>1gb</ram>

<internal>8gb</internal>

</mobile>

<mobile>

<brand>Samsung</brand>

<os>Android</os>

<model>Galaxy</model>

<ram>2gb</ram>

<internal>8gb</internal>

</mobile>

<mobile>

<brand>Sony</brand>

<os>Android</os>

<model>Experia</model>

<ram>512mb</ram>

<internal>16gb</internal>

</mobile>

</mobilestore>



<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
 attributeFormDefault="unqualified">
<xs:element name="mobilestore">
<xs:complexType>
    <xs:sequence>
        <xs:element name="mobile" maxOccurs="unbounded">
            <xs:complexType>
            <xs:sequence>
            <xs:element name="brand" type="xs:string"/>
            <xs:element name="os" type="xs:string"/>
            <xs:element name="model" type="xs:string"/>
            <xs:element name="ram" type="xs:string"/>
            <xs:element name="internal" type="xs:string"/>
            </xs:sequence>
            </xs:complexType>
        </xs:element>
    </xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>


Evaluation Result:


 

Result Description

Summary of tests
*Note: All the test cases might not have same weightage
+------------------------------+
|  1  test run/ 1  test passed |
+------------------------------+

Comments

Subscribe to Get's Answer by Email