Datasheet
Figure 1-6: Creating a simple HTML page containing an XML data island
How It Works
You created an HTML page that referenced an XML document from the HTML page as a data island.
The data island is referenced from the HTML page, to the XML document, using the XML tag as defined
in the HTML page. Data is scrolled through in the HTML page using an HTML table field, using the
DATASRC attribute of the HTML <TABLE> tag.
Introducing the XML Document
Object Model
Another factor when using XML is that built into the browser used to display XML data, is a structure
behind the XML data set. Look again at Figure 1-3 and you should see that everything is very neatly
structured into a hierarchy. This entire structure can be accessed programmatically using something
called the Document Object Model, or XML DOM. Using the XML DOM a programmer can find, read,
and even change anything within an XML document. Those changes can also be made in two fundamen-
tal ways:
❑ Explicit data access: A program can access an XML document explicitly. For example, one can
find a particular city by using the <city> tag and the name of the city.
❑ Dynamic or generic access: A program can access an XML document regardless of its data con-
tent by using the structure of the document. In other words, a program can scroll through all the
tags and the data no matter what it is. That is what the XML DOM allows. An XML page can be
a list of cities, weather reports, or even part numbers for an automobile manufacturer. The data
set is somewhat irrelevant because the XML DOM allows direct access to the program within
the browser, which displays the XML data on the screen, as shown in Figure 1-3. In other words,
a program can find all the tags by passing up and down the tree of the XML DOM.
11
What Is XML?
04_791202 ch01.qxp 10/6/06 10:59 AM Page 11