| Contents > CFML Reference > ColdFusion Functions > XmlParse |
|
|
|
|
||
Converts an XML document that is represented as a string variable into an XML document object.
An XML document object.
Conversion functions, Extensibility functions, XML functions
XmlParse(xmlString [, caseSensitive ] )
cfxml, IsXmlDoc, XmlChildPos, XmlChildPos, XmlFormat, XmlNew, XmlSearch, XmlTransform
ColdFusion MX: Added this function.
Parameter |
Description |
|---|---|
xmlString |
An XML document object string |
caseSensitive |
|
The caseSensitive attribute value determines whether identifiers whose characters are of varying case, but are otherwise the same, refer to different components. For example:
caseSensitive = "no", the names mydoc.employee.name[1] and mydoc.employee.NAME[1] refer to the same elementcaseSensitive = "yes", these names refer to two distinct elementsIf the XML document is represented by a string variable, use the XmlParse tag directly on the variable. For example, if your application uses cfhttp action="get" to get the XML document, use the following code to create the XML document object:
<cfset myXMLDocument = XmlParse(cfhttp.fileContent)>
If the XML document is in a file, use the cffile tag to convert the file to a CFML variable, then use the XmlParse tag on the resulting variable. For example, if the XML document is in the file C:\temp\myxmldoc.xml, use the following code to convert the file to an XML document object:
<cffile action="read" file="C:\temp\myxmldoc.xml" variable="XMLFileText"> <cfset myXMLDocument=XmlParse(XMLFileText)>
Note: If the file is not encoded with the ASCII or Latin-1 character encoding, use the cffile tag charset attribute to specify the file's character encoding. For example, if the file is encoded in UTF, specify charset="UTF-8".
|
|
||
| Contents > CFML Reference > ColdFusion Functions > XmlParse |
|
|
ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6.1
Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funca125.htm
Comments
spage said on Sep 20, 2003 at 3:12 AM : spage said on Sep 20, 2003 at 3:23 AM : SeanCorfield said on Oct 28, 2003 at 3:24 PM : Der Nickname said on Dec 13, 2004 at 12:34 AM : Der Nickname said on Dec 13, 2004 at 5:58 AM : No screen name said on Mar 11, 2005 at 1:32 AM : No screen name said on Apr 26, 2005 at 6:09 PM : DaveF67 said on Jul 6, 2005 at 9:22 AM : DaveF67 said on Jul 6, 2005 at 9:33 AM : jmk4444 said on Aug 3, 2005 at 9:09 AM : No screen name said on Aug 8, 2005 at 4:55 PM : Corey Gilmore said on Sep 16, 2005 at 1:25 PM : John2 said on Sep 22, 2005 at 4:04 AM :