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>
Result Description
Comments
Post a Comment