<html>
<head>
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>ISXMLROOT</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
   <div id="Description">
   <table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
      <tr> 
         <td valign="top" class="name">ISXMLROOT</td>
         <td valign="top" nowrap class="compatibility">&nbsp;</td>
      </tr>
      <tr>
         <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
      </tr>


    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Description</span>
<p>
Determines whether the function parameter is the root element of an XML document object.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Returns</span>
<p>
True, if the function argument is the root object of an XML document object; False, otherwise.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Category</span>
<p>
Decision functions, XML functions
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Function syntax</span><pre>IsXmlRoot(value)
</pre>    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">See also</span>
<p>
IsXML, IsXmlAttribute, IsXmlDoc, IsXmlElem, IsXmlNode, XmlGetNodeType, XmlValidate; Chapter&#160;35, "Using XML and WDDX" in ColdFusion MX Developer's Guide
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">History</span>
<p>
ColdFusion&#160;MX: Added this function.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Parameters</span>
<p>

</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Example</span>
<p>
The following example tests whether an XML document object, its root element, and a child element are XML root elements:
</p>
<pre>&lt;!--- Create an XML document object ---&gt;
&lt;cfxml variable=&quot;xmlobject&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;order id=&quot;4323251&quot;&gt;
   &lt;customer firstname=&quot;Philip&quot; lastname=&quot;Cramer&quot; accountNum=&quot;21&quot;/&gt;
   &lt;items&gt;
      &lt;item id=&quot;43&quot;&gt;
         &lt;quantity&gt;1&lt;/quantity&gt;
         &lt;unitprice&gt;15.95&lt;/unitprice&gt;
      &lt;/item&gt;
   &lt;/items&gt;
&lt;/order&gt;
&lt;/cfxml&gt;

&lt;!--- Test objects to see if they are XML root elements ---&gt;
&lt;cfoutput&gt;
&lt;h3&gt;Are the following the XML Root?&lt;/h3&gt;
xmlobject: #IsXmlRoot(xmlobject)#&lt;br&gt;
xmlobject.order: #IsXmlRoot(xmlobject.order)#&lt;br&gt;
&lt;!--- The order element id attribute ---&gt;
xmlobject.order.XmlAttributes.id: 
   #IsXmlRoot(xmlobject.order.XmlAttributes.id)#&lt;br&gt;
&lt;/cfoutput&gt;
</pre>
         </td>
      </tr>
   </table>
   </div>
<div id="VALUE">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">VALUE</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>


<p>Name of an XML document object</p>

  </td>
  </tr>
  </table>
</div>

  </body>
</html>
