Adobe COLDFUSION 9 Manual page 1069

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using Web Elements and External Objects
Tag or function
IsXmlAttribute(variable)
IsXmlDoc(objectName)
IsXmlElem(elementName)
IsXmlNode(variable)
IsXmlRoot(elementName)
ToString(objectName)
XmlFormat(string)
About case sensitivity and XML document objects
The tags and functions that create XML document objects let you specify whether ColdFusion treats the object in a
case-sensitive manner. If you do not specify case sensitivity, ColdFusion ignores the case of XML document object
component identifiers, such as element and attribute names. If you do specify case sensitivity, names with different
cases specify different components. For example, if you do not specify case sensitivity, the names
mydoc.employee.name[1] and mydoc.employee.NAME[1] always specify the same element. If you specify case
sensitivity, these names specify two separate elements. You cannot use dot notation references for element or attribute
names in a case-sensitive XML document; for more information see
page 1064.
Using an XML object
Because an XML document object is represented as a structure, you can access XML document contents using either,
or a combination of both, of the following ways:
• Using the element names, such as mydoc.employee.name[1]
• Using the corresponding structure entry names (that is,
mydoc.employee.XmlChildren[1]
Similarly, you can use either, or a combination of both, of the following notation methods:
• Structure (dot) notation, such as mydoc.employee
• Associative array (bracket) notation, such as mydoc["employee"]
Referencing the contents of an XML object
Use the following rules when you reference the contents of an XML document object on the right side of an assignment
or as a function argument:
• By default, ColdFusion ignores element name case. As a result, it considers the element name MyElement and the
element name myELement to be equivalent. To make element name matching case-sensitive, specify
CaseSensitive="True"
function that creates the document object.
• If your XML object is case sensitive, do not use dot notation to reference an element or attribute name. Use the
name in associative array (bracket) notation, or a reference that does not use the case-sensitive name. For example,
do not use names such as the following:
Description
Determines whether the function parameter is an XML Document Object Model (DOM) attribute
node.
Returns
if the function argument is an XML document object.
True
Returns
True
if the function argument is an XML document object element.
Determines whether the function parameter is an XML document object node.
Returns
True
if the function argument is the root element of an XML document object.
Converts an XML document object to a string representation.
Escapes special XML characters in a string so that the string can be used as text in XML.
in the
tag, or specify
cfxml
True
Last updated 8/5/2010
"Referencing the contents of an XML
array entries), such as
XmlChildren
as a second argument in the
object" on
or
XmlParse
XmlNew
1064

Advertisement

Table of Contents
loading

Table of Contents