O'Reilly logo

The Book of JavaScript, 2nd Edition by thau!

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

The Rules of XML

The rules for XML documents are simple and few. As another example of an XML document, consider the XML-style English-to-Italian dictionary in Figure 15-5.

A simple XML document

Figure 15-5. A simple XML document

The XML Header

All XML documents start with an XML header like the one in Figure 15-5. XML headers can also include an optional attribute called an encoding, as you can see in the first line of Figure 15-3. This encoding tells an XML processor what kind of characters to expect in the document.

XML Elements

XML elements are used to mark up information. For example, to indicate that something is an English word, we might define an XML element called ...

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