MACROMEDIA COLFUSION MX 7-CFML Reference page 697

Cfml reference
Hide thumbs Also See for COLFUSION MX 7-CFML:
Table of Contents

Advertisement

<!--- Create an XML document object --->
<cfxml variable="xmlobject">
<order id="4323251">
<customer firstname="Philip" lastname="Cramer" accountNum="21"/>
<items>
<item id="43">
<quantity>1</quantity>
<unitprice>15.95</unitprice>
</item>
</items>
</order>
</cfxml>
<!--- Get an array with all lastname quantity DOM attribute nodes
(In this example there is only one entry) --->
<cfset lastnames = XmlSearch(xmlobject, '//@lastname')>
<!--- Test objects to see if they are attributes --->
<cfoutput>
<h3>Are the following XML Attribute nodes?</h3>
<!--- The order element id attribute.
This a simple variable, not a DOM attribute node.--->
node.xmlobject.order.XmlAttributes.id:
#IsXmlAttribute(xmlobject.order.XmlAttributes.id)#<br>
<!--- The items element --->
xmlobject.order.items: #IsXmlAttribute(xmlobject.order.items)#<br>
lastnames[1] returned by XmlSearch:
#isXmlAttribute(lastnames[1])#<br>
</cfoutput>
IsXmlAttribute
697

Advertisement

Table of Contents
loading

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents