For illustration, the examples discussed in this chapter use a single XML file, listed in Listing 10.1. [1]
Listing 10.1 rolodex.xml (Simple Version)<?xml version="1.0" encoding="ISO-8859-1"?> <rolodex> <contact> <firstName>Anna</firstName> <lastName>Keeney</lastName> <company>BSC, Inc.</company> <email>anna.keeney@worldlink.net</email> <phone type="work">716-873-9644</phone> <phone type="home">716-834-8772</phone> </contact> <contact> <firstName>Lynn</firstName> <lastName>Seckinger</lastName> <company>Sabreware, Inc.</company> <email>lynn.seckinger@telecom.net</email> <phone type="work">716-219-2012</phone> </contact> <contact> <firstName>Ronald</firstName> <lastName>Dunlap</lastName> <company>World Traders, Inc.</company> <email>ron.dunlap@worldlink.net</email> <phone type="work">915-783-6494</phone> <phone type="home">915-843-8727</phone> </contact> </rolodex> The preceding XML file represents a Rolodex that contains business contacts composed of first and last names , company name , e-mail, and work and home phone numbers. Home phone numbers are optional, as you can see from the second contact listed above. |