IsXML
Determines whether a string is well-formed XML text.
Note, this will return true if the XML contiains things like XEE (XML External Entity) or doctype definitions, which are prohibited by your XML Settings.
Method Signature
IsXML(value=[any])Arguments
Argument
Type
Required
Description
Default
value
any
true
A string containing the XML document text.
Examples
isXML Example
Returns true if the string is well-formed XML.
example = "<boxlangengines>
<engine>
<name>Adobe ColdFusion</name>
</engine>
<engine>
<name>Boxlang</name>
</engine>
<engine>
<name>Railo</name>
</engine>
<engine>
<name>Open BlueDragon</name>
</engine>
</boxlangengines>";
writeOutput( isXml( example ) );
Result: true
isXML Example for Invalid XML
Returns false if the string is not well-formed XML.
Result: false
Additional Examples
Related
Last updated
Was this helpful?
