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

Creating a Well-Formed XML Document

Let's take a look at the creation of a well-formed XML document. In this example, we will create a simple document for keeping track of appointments.

First, we could create this document using only elements. Here are the elements we're going to use in the document:

  • appointments— This element will serve as the root element of the document, containing all the other elements in the document.

  • event— The event element will contain the information about each individual appointment.

  • date— A child of the event element, this is the date of the event.

  • start-time— A child of the event element, this is the starting time for the appointment.

  • end-time— A child element of the event element, this is the ending time for the appointment. ...

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