XML Schema Definition (XSD) is used to validate and describe an XML data structure and content . It defines the
elements
,
attributes
and
data types
. Here is how XML schema looks like
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="company">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="id" type="xs:unsignedInt" />
        <xs:element name="name" type="xs:string" />
        <xs:element name="phone" type="xs:string" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
The XML schema is derived from the following XML:
<company>
    <id>2859385</id>
    <name>Tanmay Patil</name>
    <phone>(011) 123-4567</phone>
</company>
The XML schema is generated using the following online tool:
https://www.liquid-technologies.com/online-xml-to-xsd-converter
by Valeri Tandilashvili
4 years ago
XML
XML Schemas
XML Tutorial
0
Pro tip: use ```triple backticks around text``` to write in code fences