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:

Pattern

  /* To print Pattern:                     *                 *   *             *   *   *         *   *   *   *     *   *   *   *   * */ #include   <iostream> using   namespace   std ; int   main (){       #ifndef  ONLINE_JUDGE          freopen ( "../asset/input.txt" , "r" , stdin );          freopen ( "../asset/output.txt" , "w" , stdout );     #endif     //...

Number Pattern

  /* @ToDo     Number Pattern                 1                    1       2                1       2       3            1       2       3       4        1       2       3       4       5            */ #include   <iost...

Goldmine

1. You are given a number n, representing the number of rows. 2. You are given a number m, representing the number of columns. 3. You are given n*m numbers, representing elements of 2d array a, which represents a gold mine. 4. You are standing in front of left wall and are supposed to dig to the right wall. You can start from       any row in the left wall. 5. You are allowed to move 1 cell right-up (d1), 1 cell right (d2) or 1 cell right-down(d3). 6. Each cell has a value that is the amount of gold available in the cell. 7. You are required to identify the maximum amount of gold that can be dug out from the mine. Input Format A number n A number m e11 e12.. e21 e22.. .. n * m number of elements Output Format An integer representing Maximum gold available. Constraints 1 <= n <= 10^2 1 <= m <= 10^2 0 <= e1, e2, .. n * m elements <= 1000 Sample Input 6 6 0 1 4 2 8 2 4 3 6 5 0 4 1 2 4 1 4 6 2 0 7 3 2 2 3 1 5 9 2 4 2 7 0 8 5 1 Sample Output 33 Solution:...

Subscribe to Get's Answer by Email