From the course: XML Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

What is XML schema?

What is XML schema? - XML Tutorial

From the course: XML Essential Training

Start my 1-month free trial

What is XML schema?

- [Instructor] In this chapter, we're going to look at an alternative way of enforcing rules and constraints on your XML data, called XML Schema. XML Schema is an alternative to using DTDs, which we looked at in the last chapter. XML Schema allows you to constrain the document content just like you do in a DTD. So, in that way, they're similar. But Schema is actually much more powerful and sophisticated than DTDs are. They allow a much finer level of control than DTDs provide you with. So, for example, recall from the previous chapter, how we talked a little bit about how it's possible, for example, to generally control how many elements can appear inside of another element by using special characters. But there was no way to say that an element can appear only four times in another element or constrain the value of an attribute to a specific pattern. In Schema, you can do things like that. You can also do things like derive your own types and enforce those rules on your XML data…

Contents