User Guide
914 Chapter 3: ColdFusion Functions
XmlGetNodeType
Description
Determines the type of an XML document object node.
Returns
A string identifying the XML node type. The following values are valid:
If the argument is not a document object node, the function generates an error.
Category
XML functions
Function syntax
XmlGetNodeType(xmlNode)
See also
IsXmlAttribute
, IsXmlDoc, IsXmlElem, IsXmlNode, IsXmlRoot, XmlChildPos, XmlValidate;
Chapter 35, “Using XML and WDDX” in ColdFusion MX Developer’s Guide
History
ColdFusion MX 7: Added this function.
Parameters
Usage
The XmlGetNodeType function can determine the types of the nodes returned by the XmlSearch
function, or the types of the entries in an element’s XmlNodes array.
Example
The following example checks the node types of various parts of an XML document object:
<!--- 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"/>
ATTRIBUTE_NODE CDATA_SECTION_NODE
COMMENT_NODE DOCUMENT_FRAGMENT_NODE
DOCUMENT_NODE DOCUMENT_TYPE_NODE
ELEMENT_NODE ENTITY_NODE
ENTITY_REFERENCE_NODE NOTATION_NODE
PROCESSING_INSTRUCTION_NODE TEXT_NODE
Parameter Description
xmlNode An XML DOM object node