Database Reference
In-Depth Information
XML declaration
<?xml version="1.0" encoding="UTF-8"?>
<dataroot>
<Rep>
<RepNum>20</RepNum>
<LastName>Kaiser</LastName>
<FirstName>Valerie</FirstName>
<Street>624 Randall</Street>
<City>Grove</City>
<State>FL</State>
<Zip>33321</Zip>
<Commission>20542.5</Commission>
<Rate>0.05</Rate>
</Rep>
<Rep>
<RepNum>35</RepNum>
<LastName>Hull</LastName>
<FirstName>Richard</FirstName>
<Street>532 Jackson</Street>
<City>Sheldon</City>
<State>FL</State>
<Zip>33553</Zip>
<Commission>39216</Commission>
<Rate>0.07</Rate>
</Rep>
<Rep>
<RepNum>65</RepNum>
<LastName>Perez</LastName>
<FirstName>Juan</FirstName>
<Street>1626 Taylor</Street>
<City>Fillmore</City>
<State>FL</State>
<Zip>33336</Zip>
<Commission>23487</Commission>
<Rate>0.05</Rate>
</Rep>
</dataroot>
Element values
from the first Rep
table record
293
Element values
from the second Rep
table record
Element values
from the third Rep
table record
FIGURE 9-9
XML document created from the Rep table in the Premiere Products database
An XML document should begin with an XML declaration that specifies to an XML processor which ver-
sion of XML to use. The first line in the XML document shown in Figure 9-9 is the XML declaration:
< ?xml version ¼ "1.0" encoding ¼ "UTF-8"? >
The XML declaration instructs the XML processor to use version 1.0 of the XML specification. The sec-
ond, optional clause in the XML declaration (encoding
¼
"UTF-8") specifies that the XML document uses Uni-
code character coding.
Following the XML declaration in Figure 9-9, the
tag identifies an element named dataroot,
which is a standard element in Office 2010 exported XML documents. The dataroot element serves as a con-
tainer for all the other elements defined in the XML document, and its matching
dataroot
<
>
/dataroot
tag at the end
<
>
of the document identifies the end of the scope of the dataroot element.
Search WWH ::




Custom Search