For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

Run Example

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.

Run Example

Result: false

Additional Examples

Run Example

Last updated

Was this helpful?