xmlParse

Converts an XML document that is represented as a string
variable into an XML document object.

xmlParse(xmlString [, caseSensitive] [, validator]) → returns xml

xmlParse Argument Reference

xmlString string
Required

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 boolean
Default: false

Maintains the case of document elements and attributes.
Default: false
Values:
  • true
  • false

validator string

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.

Examples sample code invoking the xmlParse function

Read XML from a file and use the xmlParse method to parse it into an XML data structure.

<cffile action="read" file="#tempxml#" variable="xmlString">
<cfset myXML = xmlParse(xmlString)>

Fork me on GitHub