How to convert XML to xsd online

Written by suraiyak
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to convert XML to xsd online
(Siri Stafford/Digital Vision/Getty Images)

XML means eXtensible Markup Language whereas XSD means XML Schema definition. XML documents transfer data to and from web services. XSD defines the structure and data type of the elements in an XML document. Use XSD to validate the content of an XML document. You may need to modify the automatically generated XSD to fulfil business requirements.

Skill level:

Other People Are Reading

Things you need

  • Flame-Ware, Hit Software SML Utility or XML Schema Generator
  • Text editor
  • W3schools XSD tutorial

Show MoreHide


  1. 1

    Create an XML document. For example, an employee records file may look like:

    <?xml version="1.0" encoding="UTF-8"?> <employeerecords> <employee category="fulltime"> <name>Alex Weber</name> <ssn>123456784</ssn> <dept>Sales</dept> <role>Manager</role> <brief_bio lang="en">BA in Sales</brief_bio> </employee> </employeerecords>

  2. 2

    Save the XML document.

  3. 3

    Visit the Flame-Ware website (see References).

  4. 4

    Insert the full path name of the local XML document in the text box for file name.

  5. 5

    Press the "Convert" button. The generated XSD will appear in the text area at the bottom of the page.

  6. 6

    Save the generated XSD to your computer.

  7. 7

    Modify the content of the XSD if necessary. For example, in the employee records file to indicate that SSN is a required field and it must have nine digits, the XSD file would look like:

    <xs:element name="ssn" minOccurs="1" maxOccurs="1" msdata:Ordinal="1"> <xs:simple Type> <xs:restriction base="xs:string"> <xs:pattern value="[0-9]{9}"/> </xs:restriction> </xs:simpleType>

  8. 8

    Save the modified XSD file.

  1. 1

    Visit the Hit Software website for an XML utility (see References). Insert the name of the XML document in the text box labelled as "XML Document."

  2. 2

    Press the "Generate XML Schema" button to generate XSD.

  3. 3

    Modify the content of the XSD and save the XSD.

  1. 1

    Visit the for the XML schema generation page (see References).

  2. 2

    Insert the content of your XML document or corresponding URL in the text box.

  3. 3

    Press the "Generate Schema" button.

  4. 4

    Modify the generated XSD, and save.

Tips and warnings

  • So the automatically generated and modified XSD represents the XML document, validate the file (e.g., employee_list.xml) with respect to the XSD file (e.g., employee_list.xsd) using an online validator from Before doing so, transfer the XML and XSD files to a server. Then in the "Address" text box on the online validator, insert the URL for the XML file name then the URL for the XSD file name with a space in between the names. Press the "Get Results." If you see error messages, then modify the content of the XSD file and test it. Do it repeatedly until there is no error.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.