O'Reilly logo

Special Edition Using XML, Second Edition by - et al. David Gulbransen

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

An XML Document Example

With the basics of XML at our disposal, it is now possible to create an XML document that is well formed, and can be used in a variety of applications.

In this example, we're going to create a simple XML document for a technical journal. This journal XML document will contain some elements that describe the cover, a table of contents, the journal articles themselves, and an index. Obviously, we could go into a very fine level of detail here, and as you learn more about XML, hopefully you will see ways in which you could extend this exercise. However, for this example, we're going to try to limit the document to what we've covered so far.

First, we need to start our XML document with the XML declaration and the root element: ...

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