
1081
DEVELOPING
COLDFUSION 9 APPLICATIONS
Using Web Elements and External Objects
Las
t
upda
te
d 8/5/2010
4
Generates the receipt as an XML document.
This example displays the results of the processing steps to show you what has been done.
The XML document
The order.xml document has the following structure:
•
The root element is named order and has one attribute, id.
•
One customer element exists with firstname, lastname, and accountnum attributes. The customer element does not
have a body
•
One items element exists that contains multiple item elements
•
Each item element has an id attribute and contains a name, quantity, and unitprice element. The name, quantity,
and unitprice elements contain their value as body text.
The following order.xml document works correctly with the information in the cfdocexamples database:
<order id="4323251">
<customer firstname="Philip" lastname="Cramer" accountNum="21"/>
<items>
<item id="43">
<name>
Large Hammer
</name>
<quantity>
1
</quantity>
<unitprice>
15.95
</unitprice>
</item>
<item id="54">
<name>
Ladder
</name>
<quantity>
2
</quantity>
<unitprice>
40.95
</unitprice>
</item>
<item id="68">
<name>
Paint
</name>
<quantity>
10
</quantity>
<unitprice>
18.95
</unitprice>
</item>
</items>
</order>
Содержание COLDFUSION 9
Страница 1: ...Developing Applications ADOBE COLDFUSION 9...