Determines whether a string is well-formed XML text.
isXML(value)
returns boolean
Name | Type | Required | Default | Description |
---|---|---|---|---|
value | string | Yes | A string containing the XML document text. | |
parserOptions | struct | No | XML parsing options. No documentation available on usage. |
Returns true if the string is well-formed XML.
example = '<coldfusionengines>
<engine>
<name>Adobe ColdFusion</name>
</engine>
<engine>
<name>Lucee</name>
</engine>
<engine>
<name>Railo</name>
</engine>
<engine>
<name>Open BlueDragon</name>
</engine>
</coldfusionengines>';
writeOutput( isXml( example ) );
Returns false if the string is not well-formed XML.
example1 = '<coldfusionengines>
<engine>
<name>Adobe ColdFusion</name>
</engine>
<engine>
<name>Lucee</name>';
writeOutput( isXml( example1 ) );