Datasheet

<region>Asia</region>
<country>Burma</country>
<region>Australasia</region>
<country>Australia</country>
<region>Caribbean</region>
<country>Bahamas</country>
<country>Barbados</country>
</regions>
6. When executed in a browser, the result will look as shown in Figure 1-4.
Figure 1-4: Creating a simple XML document
How It Works
You opened a text editor and created an XML document file. The XML document begins with the XML
tag, identifying the version of XML is use. Next you added the root node called
<regions>. All XML
documents must have a single root node. Next you added four
<region> nodes representing four
regions into the root node. Next you added countries into the four different regions. Last, you viewed
the XML document in your browser.
Embedding XML in HTML Pages (Data Islands)
XML documents can also be displayed in a browser using an XML data island. An XML data island is an
XML document (with its data) directly or indirectly embedded inside an HTML page. An XML docu-
ment can be embedded inline inside an HTML page using the HTML
<XML> tag. It can also be referenced
with an HTML
SRC attribute.
7
What Is XML?
04_791202 ch01.qxp 10/6/06 10:59 AM Page 7