Skip to main content

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

 

Generate XSD 2

Generate XSD for the following XML document

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

<!--  <!DOCTYPE  hotels  SYSTEM "hotel.dtd"> -->

<hotels>

<hotel>

<ID>1</ID>

<Name> TAJ GANJ </Name>

<Stars>3</Stars>

<Facilities>Restaurant,Parking,Internet</Facilities>

<Address>Taj Ganj,FFatehabad Road Agra Uttar Pradesh 282001</Address>

<Type>budget</Type>

<Available>true</Available>

</hotel>

<hotel>

<ID>2</ID>

<Name> TAJ EXOTICA </Name>

<Stars>5</Stars>

<Facilities>Indian therapies,Yoga and meditation,Spaindulges,Parking</Facilities>

<Address>CalwaddoBenaulim, Salcete Goa 403716</Address>

<Type>luxury</Type>

<Available>false</Available>

</hotel>

<hotel>

<ID>3</ID>

<Name> VIVANTA by TAJ </Name>

<Stars>3</Stars>

<Facilities>Parking,Restaurant,Internet,Chinese Restaurant, Party Lawn</Facilities>

<Address>105, Race Course Road Coimbatore TamilNadu 641018</Address>

<Type>medium luxury</Type>

<Available>true</Available>

</hotel>

<hotel>

<ID>4</ID>

<Name> TAJ DECCAN </Name>

<Stars>4</Stars>

<Facilities>Parking,Fitnesscenter,Meetingrooms,Private dining for party</Facilities>

<Address>Road No. 1, Banjara Hills Hyderabad Telangana State 500034</Address>

<Type>Budget</Type>

<Available>true</Available>

</hotel>

<hotel>

<ID>5</ID>

<Name> TAJ BEKAL RESORT </Name>

<Stars>4</Stars>

<Facilities>Spa ,Internet ,Yoga and meditation,parking,internet</Facilities>

<Address>Kappil Beach Kasargod Kerala 671319</Address>

<Type>Luxury</Type>

<Available>false</Available>

</hotel>

</hotels>

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="hotels">
<xs:complexType>
    <xs:sequence>
        <xs:element name="hotel" maxOccurs="unbounded">
            <xs:complexType>
            <xs:sequence>
            <xs:element name="ID" type="xs:int"/>
            <xs:element name="Name" type="xs:string"/>
            <xs:element name="Stars" type="xs:int"/>
            <xs:element name="Facilities" type="xs:string"/>
            <xs:element name="Address" type="xs:string"/>
            <xs:element name="Type" type="xs:string"/>
            <xs:element name="Available" 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:

Accenture Mock Quiz | Part 4

  Question  31 Correct Marked out of 1.00 Flag question Question text What will be the output of the following Java code? class Test extends Throwable { } class Base extends Test {} public class Main { public static void main(String args[]) { try { throw new Base(); } catch(Test t) { System.out.println("Test Exception"); } finally { System.out.println("Finally block "); } } } Select one: a.  Complilation error : Bass calss can't extends Test b.  print-"Test Exception" c.  Complilation error: Test Class cant extends Throwable d.  print - "Test Exception" "Finally block "   Feedback The correct answer is: print - "Test Exception" "Finally block " Question  32 Correct Marked out of 1.00 Flag question Question text Which of the following statement(s) is/are TRUE? (i) In a non-correlated(independent) subquery, the subquery is always executed only onc...

RDBMS Data Definition Language | Purge Distributor table Truncate

 RDBMS  Data Definition Language  Purge Distributor table Truncate The mobile management wants to purge all the records from the “Distributor “table.  Write an SQL statement to purge all the records from the distributor table without allowing rollback activity. Evaluation Result: Result Description Summary of tests +------------------------------+ | 1 tests run / 1 test passed | +------------------------------+

Subscribe to Get's Answer by Email