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

Markup and Character Data

XML documents are made up of markup and character data (and possibly, one day, binary data, but there is no provision for enclosing binary data in a document made up of markup and character data yet—until there is, you refer to external binary data with entity references, as we'll see).

The markup in a document gives it its structure. Markup includes start tags, end tags, empty-element tags, entity references, character references, comments, CDATA section delimiters (we'll see more about CDATA sections in a few pages), DTDs, and processing instructions. So what's the character data in an XML document? All the text in a document that is not markup is character data.

Here's a quick example using markup and character data ...

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