19.3. Structuring Data

In this section and throughout this chapter, we create our own XML markup. XML allows you to describe data precisely in a well-structured format.

XML Markup for an Article

In Fig. 19.2, we present an XML document that marks up a simple article using XML. The line numbers shown are for reference only and are not part of the XML document.

Figure 19.2. XML used to mark up an article.
						1
						<?xml version = "1.0" ?>
						2
						<!-- Fig. 19.2: article.xml -->
						3
						<!-- Article structured with XML -->
						4
						5
						<article>
						6
						<title>Simple XML</title>
						7
						8
						<date>May 5, 2005</date>
						9
						10
						<author>
						
						11
						
							<firstName> John</firstName>
						12
						
							<lastName> Doe</lastName>
						
						13
						</author>
						
						14
						15
						<summary> XML is pretty easy.</summary>
						16
						17
						<content>
						18 In this chapter, ...

Get Visual Basic 2005 for Programmers: Deitel Developer Series, 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.