How to Convert XML to Xsd Online
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 fulfill business requirements.
Things You'll Need
- Flame-Ware, Hit Software SML Utility or XML Schema Generator
- Text editor
- W3schools XSD tutorial
Create an XML document. For example, an employee records file may look like:
Save the XML document.
Visit the Flame-Ware website (see References).
Insert the full path name of the local XML document in the text box for file name.
Press the "Convert" button. The generated XSD will appear in the text area at the bottom of the page.
Save the generated XSD to your computer.
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:
Save the modified XSD file.
Hit Software Instructions
Visit the Hit Software website for an XML utility (see References). Insert the name of the XML document in the text box labeled as "XML Document."
Press the "Generate XML Schema" button to generate XSD.
Modify the content of the XSD and save the XSD.
XML Schema Generator
Visit the xmlforasp.net for the XML schema generation page (see References).
Insert the content of your XML document or corresponding URL in the text box.
Press the "Generate Schema" button.
Modify the generated XSD, and save.
Tips & 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 w3.org. 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.