From the course: XML Essential Training

Unlock the full course today

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

Declaring elements

Declaring elements - XML Tutorial

From the course: XML Essential Training

Start my 1-month free trial

Declaring elements

- [Instructor] In this example we'll see how to declare elements with Schema. Now XML Schema is a fairly complex subject and it's another one of those things that could probably fill an entire course by itself. So I'm not going to go into every possible feature that Schema provides. However, by the end of this chapter you should know enough to be able to generate some pretty sophisticated XML Schema documents to validate your content. By the time we reach the end of this chapter we'll see how we can use Schema to build a validation file for the business card example that we've been using in the course. So as I mentioned earlier, elements are declared using the element tag in the Schema file. And elements can be declared as either having a simple or a complex type. These types can either be built-in, which means they are already defined for you by Schema, or your Schema file can define your own custom types. Just like with DTDs, you can declare elements that have mixed, empty, or…

Contents