User Guide

918 Chapter 3: ColdFusion Functions
XmlParse
Description
Converts XML text into an XML document object.
Returns
An XML document object.
Category
Conversion functions, XML functions
Function syntax
XmlParse(xmlText [[, caseSensitive ], validator])
See also
cfxml
, IsXML, ToString, XmlFormat, XmlNew, XmlSearch, XmlTransform, XmlValidate;
Chapter 35, “Using XML and WDDX” in ColdFusion MX Developers Guide
History
ColdFusion MX 7:
Added the validator parameter.
Added support for filenames and URLs in the xmlText parameter.
Added support for relative URLs and path names.
ColdFusion MX: Added this function.
Parameters
Usage
If you specify a relative URL or path name in a parameter, ColdFusion uses the directory (or, for
URLs, the logical directory) that contains the current ColdFusion page as the path root.
Parameter Description
xmlText Any of the following:
A string containing XML text.
The name of an XML file.
The URL of an XML file; valid protocol identifiers include http, https, ftp, and
file.
caseSensitive Yes: maintains the case of document elements and attributes.
No: Default
validator Any of the following:
The name of a Document Type Definition (DTD) or XML Schema file.
The URL of a DTD or Schema file; valid protocol identifiers include http, https,
ftp, and file.
A string representation of a DTD or Schema.
An empty string; in this case, the XML file must contain an embedded DTD or
Schema identifier, which is used to validate the document.