Adobe COLDFUSION 9 Manual page 1086

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using Web Elements and External Objects
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>
Last updated 8/5/2010
1081

Advertisement

Table of Contents
loading

Table of Contents