XML Schema All In One
XSD
An XML Schema
describes the structure of an XML
document.
The XML Schema language
is also referred to as XML Schema Definition
(XSD).
https://en.wikipedia.org/wiki/XML_schema
https://www.w3.org/XML/Schema
https://www.w3.org/TR/xmlschema-1/
XML Schema Definition
An XML Schema describes the structure of an XML document, just like a DTD
.
An XML document with correct syntax is called "Well Formed".
An XML document validated against an XML Schema is both "Well Formed" and "Valid".
https://www.w3schools.com/xml/xml_schema.asp
demos
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="note">
<xs:complexType>
<xs:sequence>
<xs:element name="to" type="xs:string"/>
<xs:element name="from" type="xs:string"/>
<xs:element name="heading" type="xs:string"/>
<xs:element name="body" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
https://www.w3schools.com/xml/schema_intro.asp