<html>
<head>
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>ISXML</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">ISXML</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 a string is well-formed XML text.
</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 parameter is a string that contains well-formed XML text; 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>IsXML(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>
IsXmlAttribute, IsXmlDoc, IsXmlElem, IsXmlNode, IsXmlRoot, XmlParse, 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&#160;7: 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">Usage</span>
<p>
This function determines whether text is well-formed XML, that is, it conforms to all XML syntax and structuring rules. The string does not have to be a complete XML document. The function does not validate against a Document Type Definition (DTD) or XML Schema.
</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 creates two strings, and tests whether they are well-formed XML text:
</p>
<pre>&lt;!--- A well formed XML string ---&gt;
&lt;cfset xmlString1=&#39;&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;&#39;
&gt;

&lt;!--- An invalid XML string, missing the &lt;/item&gt; close tag ---&gt;
&lt;cfset xmlString2=&#39;&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;/items&gt;
&lt;/order&gt;&#39;
&gt;

&lt;!--- Test the strings to see if they are well formed XML ---&gt;
&lt;cfoutput&gt;
xmlString1 contains the following text:&lt;br&gt;&lt;br&gt;
#HTMLCodeFormat(xmlstring1)#
Is it well formed XML text? #IsXML(xmlString1)#&lt;br&gt;&lt;br&gt;
&lt;hr&gt;
xmlString2 contains the following text:&lt;br&gt;&lt;br&gt;
#HTMLCodeFormat(xmlstring2)#
Is it well formed XML text? #IsXML(xmlString2)#
&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>A string containing the XML document text</p>

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

  </body>
</html>
