Whatever message this page gives is out now! Go check it out!
IsXmlNode(value)Parameter | Description |
value | Name of an XML document object node. |
<!--- Create an XML document object --->
<cfxml variable="xmlobject">
<?xml version="1.0" encoding="UTF-8"?>
<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>
<!--- use XmlSearch to get an attribute node. --->
<cfset lastnames = XmlSearch(xmlobject, '//@lastname')>
<!--- Test the objects to see if they are XML nodes--->
<cfoutput>
<h3>Are the following XML nodes?</h3>
xmlobject: #IsXmlNode(xmlobject)#<br>
<!--- The items element --->
xmlobject.order.items: #IsXmlNode(xmlobject.order.items)#<br>
<!--- The order element id attribute; a simple variable, not a DOM node.--->
xmlobject.order.XmlAttributes.id:
#IsXmlNode(xmlobject.order.XmlAttributes.id)#<br>
lastnames[1] returned by XmlSearch:
#isXmlNode(lastnames[1])#
</cfoutput>