tags:

views:

25

answers:

1

need xsd for the following xml

<Author Title="Mr." BirthYear="1882">
Lalchand
</Author>

i wrote like this

<xs:element name="Author">
<xs:complexType>
     <xs:attribute name="Title" type="xs:string"/>
     <xs:attribute name="BirthYear" type="xs:string"/>
</xs:complexType>
</xs:element>

need help in writing the value of Author that is Lalchand

A: 

If you use visual studio, you can open your XML file in visual studio and Select XML -> Create Schema option in the main menu while you're in edit-mode of your XML file.

additionally, you can use xsd.exe tool generate xsd from your XML.

The XML Schema Definition (Xsd.exe) tool generates XML schema or common language runtime classes from XDR, XML, and XSD files, or from classes in a runtime assembly.

this. __curious_geek