Skip to main content

Data Formats ( XML & JSON ) XML AND JSON | Generate XSD 4

 

Generate XSD 4

Generate an XSD for the following XML document

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

<company>

<employee>

<id>101</id>

<name>Ram</name>

<salary>10000</salary>

<email>ram@gmail.com</email>

</employee>

<employee>

<id>102</id>

<name>Dinesh</name>

<salary>20000</salary>

<email>dinesh@gmail.com</email>

</employee>

<employee>

<id>103</id>

<name>sathish</name>

<salary>20000</salary>

<email>sathish@gmail.com</email>

</employee>

<employee>

<id>104</id>

<name>Praveen</name>

<salary>20000</salary>

<email>praveen@gmail.com</email>

</employee>

</company>



<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="company">
<xs:complexType>
    <xs:sequence>
        <xs:element name="employee" maxOccurs="unbounded">
            <xs:complexType>
            <xs:sequence>
            <xs:element name="id" type="xs:int"/>
            <xs:element name="name" type="xs:string"/>
            <xs:element name="salary" type="xs:int"/>
            <xs:element name="email" 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:

Software Engineering Concepts Configuration Management And Version Control Post-Quiz

 Software Engineering Concepts       Configuration Management And Version Control            Post-Quiz

Algorithm Analysis and Design Concepts Data Structure and Algorithms Pre-Quiz

Algorithm Analysis and Design Concepts       Data Structure and Algorithms            Pre-Quiz  

Software Engineering Concepts Introduction to Agile Technologies Introduction to Agile Technologies | Quiz 2

Software Engineering Concepts        Introduction to Agile Technologies             Introduction to Agile Technologies | Quiz 2

RDBMS Data Definition Language | Alter -Modify the field type

Write a query to change the field type weight varchar(20) in Mobile_specification table to number(10). Result Description Summary of tests +------------------------------+ | 3 tests run / 3 test passed | +------------------------------+

RDBMS Data Definition Language | Create Sales_info table

  Write a query to create Sales_info with constraints mentioned. Refer the below schema  Result Description Summary of tests +------------------------------+ | 3 tests run / 3 test passed | +------------------------------+

Software Engineering Concepts Hands-On

  Software Engineering Concepts  Hands-On

RDBMS Data Definition Language | Alter - Add CHECK constraint to Mobile_Master

RDBMS  Data Definition Language  Alter - Add CHECK constraint to Mobile_Master Refer the following schema and add a constraint CHK_WARRANTY in Mobile_Master table to ensure that the warranty in years is greater than zero. Evaluation Result: Result Description Summary of tests +------------------------------+ | 3 tests run / 3 test passed | +------------------------------+

RDBMS Data Definition Language | Create Buses table

 efer the below schema and create the buses table. Column Name Datatype Size Constraint Constraint name Bus_no Number 11 Primary key PK_BUSES Bus_name Varchar2 20   Type Varchar2 20   Total_seats Number 11   Avail_seats Number 11     Result Description Summary of tests +------------------------------+ | 3 tests run / 3 test passed | +------------------------------+

Star Pattern

  /* @ToDo     Star Pattern                  *                *   *   *            *   *   *   *   *        *   *   *   *   *   *   *    *   *   *   *   *   *   *   *   *    *   *   *   *   *   *   *   *   *        *  ...

Subscribe to Get's Answer by Email