Page 259 -
P. 259
226 Part 3 • the analysis Process
Data Dictionary
XML
Customer =
Name +
Address + <?xml version=“1.0”>
Current Balance + <customers>
{Order Information} + <customer number=“C15008”>
Payment <lastname>Stadler</lastname>
<name type=“I”>
Name = <firstname>Karen</firstname>
<middle_initial>L</middle_initial>
Last Name + </name>
First Name + <address>
(Middle Initial) <street>123 Oak Street</street>
<apartment>Suite 16</apartment>
<city>Madison</city>
Address =
Street + <state>WI</state>
(Apartment) + <zip>43704</zip>
City + <country>United States</country>
State + </address>
Zip + <current_balance>123.45</current_balance>
Country <order customer_number=“C15008”>
<order_number>00123</order_number>
Order Information = <order_date format=“yyyymmdd”>2008-06-23</order_date>
Order Number +
Order Date + <total>1345.89</total>
<ship_date format=“yyyymmdd”>2008-06-25</ship_date>
Ship Date + </order>
Total <order customer_number=“C15008”>
<order_number>00127</order_number>
<order_date format=“yyyymmdd”>2008-09-18</order_date>
Payment = <ship_date format=“yyyymmdd”>2008-09-26</ship_date>
[Check Credit Card] + <total>240.00</total>
Payment Date + </order>
Payment Amt <payment>
<check>
Check = <check_number>7234</check_number>
Check Number </check>
Credit Card = <payment_date format=“yyyymmdd”>2008-09-30</payment_date>
<payment_amt>1585.89</payment_amt>
Credit Card Number + </payment>
Expiration Date </customer>
</customers>
Figure 8.16
Using a data dictionary entry to develop XML content. The XML document mirrors the data dictionary structure.
into smaller elements and structures until all elements are defined. XML elements may also
include attributes, additional data included within the tag that describe something about the
XML element.
Figure 8.16 illustrates a data dictionary containing customer, order, and payment informa-
tion. The overall collection of customers is included in what is called the root element: custom-
ers. An XML document may contain only one root element, so it is often the plural of the data
contained in the XML document. Each customer may place many orders. The structure is defined
in the two left columns, and the XML code appears on the right. CUSTOMER, as you can see,
consists of a NAME, ADDRESS, CURRENT BALANCE, multiple ORDER INFORMATION
entries, and a PAYMENT. Some of these structures are further subdivided.