Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 1076

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using Web Elements and External Objects
Array function
IsArray(elemPath.elemName)
ArrayClear(elemPath.elemName)
ArrayLen(elemPath.elemName)
ArrayDeleteAt(elemPath.elemName, n)
ArrayIsEmpty(elemPath.elemName)
ArrayToList(elemPath.elemName, n)
XML document object management reference
The following tables provide a quick reference to the ways you can modify the contents of an XML document object.
The sections that follow describe in detail how to modify XML contents.
Note: If your XML object is case sensitive, you cannot 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 (such as
xmlChildren[1]) instead.
Adding information to an element
Use the following techniques to add new information to an element:
Type
Using a function
Attribute
StructInsert(xmlElemPath.XmlAttributes, "key",
"value")
Child element
To append:
ArrayAppend(xmlElempath.XmlChildren,newElem)
To insert:
ArrayInsertAt(xmlElempath.XmlChildren,
position, newElem)
Deleting information from an element
Use the following techniques to delete information from an element:
Result
Always returns False.
Removes all the elements with name elemName from the elemPath element.
Returns the number of elements named elemName in the elemPath element.
Deletes the nth child named elemName from the elemPath element.
Always returns
.
False
Returns a comma-separated list of all the
elemPath named elemName.
Last updated 1/20/2012
XmlText
properties of all the children of
Using an assignment statement
xmlElemPath.XmlAttributes.key ="value"
xmlElemPath.XmlAttributes["key"]="valu
e"
To append:
xmlElemPath.XmlChildren[i] =newElem
xmlElemPath.newChildName =newElem
(where
newChildName
must be the same as
newElem.XmlName
and cannot be an indexed
name such as
name[3]
)
1071

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents