XSD Schema Generator

Generates a XSD (XML Schema) from a XML file. Simply copy-paste OR upload your XML document and let the generator figure out the rest. The generator will try to use a 'smart' approach to figure out the data type

Input XML






Output


				




What is XSD?

XSD is (XML Schema Definition) from a World Wide Web Consortium - W3C recommendation that specifies how to formally describe the elements in XML - an Extensible Markup Language document. This description can be used to verify that each item of content in a document adheres to the description of the element in which the content is to be placed.
XSD - 1.1 became an approved W3C standard in April 2012.


XSD vs DTD

XSDDTD
XSD stands for XML Schema Definition.DTD stands for Document Type Definition.
XSDs are written in XML.DTDs are derived from SGML syntax.
XSD is extensible.DTD is not extensible.
XSD supports namespace and uses its own set of namespaces and elements for defining the schema. DTD doesn't support namespace instead it has its own set of keywords for defining a schema. Example:- !DOCTYPE, !ELEMENT, !ENTITY, and e.t.c.
It supports datatypes for elements and attributes like boolean, date, string, numerics, and etc.It doesn't support datatypes, it has only #PCDATA as the data type for the elements which is used for string.
XSD defines order for child elements.DTD doesn't define the order for child elements.
XSD allows to specify restriction on data. Example:- <age></age> tag, we can write only digits here.In DTD, no restriction on datatype validation.
XSD learning is easy compared to DTD.Learning DTD is comparatively harder than XSD.
XSD is used in large XML data. Example:- Web services.DTD is more suitable for small XML data. Example:- book name, company name, and e.t.c.
XSD provides more control on XML structure.DTD doesn't give us much control over XML structure.