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

Must Read:

Data Formats ( XML & JSON ) XML AND JSON | Generate XSD For Breakfast Menu

  Generate XSD For Breakfast Menu Generate XSD for the given XML document <?xml version="1.0" encoding="UTF-8"?> <breakfast_menu> <food> <name>Turfle waffles</name> <price>$5.95</price> <description>This two turfle which has 2 famous product  is with real choco and maple syrup</description> <calories>650</calories> </food> <food> <name>Strawberry Belgian Waffles</name> <price>$24.6</price> <description>Light Belgian waffles covered with strawberries and whipped cream</description> <calories>900</calories> </food> <food> <name>Berry-Berry Belgian Waffles</name> <price>$4.78</price> <description>Light Belgian waffles covered with an assortment of fresh berries and whipped cream</description> <calories>400</calories> </food> <food> <name>Fried Toast</name> <pr...

Subscribe to Get's Answer by Email