What Is an XML Schema?

Contact Us or call 1-877-932-8228
What Is an XML Schema?

What is an XML Schema?

XML Schema is an XML-based language used to create other XML-based languages and data models. An XML schema defines element and attribute names for a class of XML documents. The schema also specifies the structure that those documents must adhere to and the type of content that each element can hold.

You might be thinking, isn't this what DTDs are? That's right! But XML Schemas are more powerful than DTDs (more on that later in the lesson).

XML documents that attempt to adhere to an XML schema are said to be instances of that schema. If they correctly adhere to the schema, then they are valid instances. This is not the same as being well formed. A well-formed XML document follows all the syntax rules of XML, but it does not necessarily adhere to any particular schema. So, again, an XML document can be well formed without being valid, but it cannot be valid unless it is well formed.

Next