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: ...
Get Special Edition Using XML, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.