10.1 A Simple XML File

   

For illustration, the examples discussed in this chapter use a single XML file, listed in Listing 10.1. [1]

[1] "Accessing External Entities" on page 460 uses a modified version of rolodex .xml . The modified version includes a Document Type Definition (DTD).

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.

   


Core JSTL[c] Mastering the JSP Standard Tag Library
Core JSTL[c] Mastering the JSP Standard Tag Library
ISBN: 131001531
EAN: N/A
Year: 2005
Pages: 124

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net