O'Reilly logo

Real World XML by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building Well-Formed Document Structure

We've learned a lot of the syntax and rules of creating XML documents at the element and character data levels. It's time to move on to the next level: actually giving your document structure.

The W3C has a lot of rules about how to structure your document in a way to make it well formed, and I'm going to take a look at those rules here. In this chapter, I'm going to talk about only standalone documents; in the next chapter, we'll see that we have to adjust these points somewhat for documents that have a DTD.

Checking Well-Formedness

If you have doubts about whether your XML document is well formed, use an online XML validator, such as the excellent one hosted by the Brown University Scholarly Technology ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required