User Guide

700 Chapter 3: ColdFusion Functions
IsXmlNode
Description
Determines whether the function parameter is an XML document object node.
Returns
True, if the function argument is an XML document object node, including an element; False,
otherwise.
Category
Decision functions, XML functions
Function syntax
IsXmlNode(value)
See also
IsXML
, IsXmlAttribute, IsXmlDoc, IsXmlElem, IsXmlRoot, XmlGetNodeType, XmlSearch,
XmlValidate; Chapter 35, “Using XML and WDDX” in ColdFusion MX Developers Guide
History
ColdFusion MX 7: Added this function.
Parameters
Usage
This function returns True for the following components of an XML document object:
The document object
Elements in the object
XmlNode objects in an element’s XmlNodes array
It also returns True for XML node objects returned by the
XmlSearch function. It does not return
True for most entries in an element, including XmlText, XmlComment, XmlCdata, or the
XmlAttributes array (or individual XML attributes).
Example
The following example tests whether an XML document object, an element, an attribute in the
object, and an attribute returned by an
XmlSearch function are nodes:
<!--- 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">
Parameter Description
value Name of an XML document object node.