Adobe COLDFUSION 9 Manual page 1075

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using Web Elements and External Objects
Function
Use
StructKeyArray
Gets an array or list with the names of all of the attributes in an element's
the names of the children of an XML element.
StructKeyList
ArrayInsertAt
Adds a new element at a specific location in an element's
ArrayAppend
Adds a new element at the end or beginning of an element's
ArrayPrepend
ArraySwap
Swaps the children in the
ArraySet
Sets a range of entries in an
entry in the array range is a copy of the structure. Can be used to set a single element by specifying the same
index as the beginning and end of the range.
ArrayDeleteAt
Deletes a specific element from an element's
ArrayClear
Deletes all child elements from an element's
StructDelete
Deletes a selected attribute from an element's
Deletes all children with a specific element name from an element's
Deletes all attributes of an element.
Deletes all children of an element.
Deletes a selected property value.
StructClear
Deletes all attributes from an element's
Duplicate
Copies an XML document object, element, or node structure.
IsArray
Returns
mydoc.XmlRoot.name, even if multiple name elements exist in XmlRoot.
IsStruct
Returns False for XML document objects, elements, and nodes. Returns True for
StructGet
Returns the specified structure, including XML document objects, elements, nodes, and
structures.
StructAppend
Appends a document fragment XML document object to another XML document object.
StructInsert
Adds a new entry to an
StructUpdate
Sets or replaces the value of a document object property such as
XmlAttributes
Note: Array and structure functions not in the preceding or table or the table in the next section, do not work with XML
document objects, XML elements, or XML node structures.
Treating elements with the same name as an array
In many cases, an XML element has multiple children with the same name. For example, the example document used
in many XML examples has multiple name elements in the employee elements. In many cases, you can treat the child
elements with identical names as an array. For example, to reference the second name element in mydoc.employee,
you can specify mydoc.employee.name[2]. However, you can only use a limited set of Array functions when you use
this notation. The following table lists the array functions that are valid for such references:
XmlChildren
array at the specified position.
XmlChildren
XMLAttributes
True
for the
XmlChildren
array. Returns false if you specify an element name, such as
structure.
XmlAttributes
structure.
Last updated 8/5/2010
XmlAttributes
array.
XmlChildren
XmlChildren
array.
array to equal the contents of a specified element structure. Each
XmlChildren
array.
array.
XmlChildren
XMLAttributes
structure.
XmlChildren
structure.
XmlName
, or of a specified attribute in an
structure. Returns
array.
XmlAttributes
structures.
XmlAttributes
1070

Advertisement

Table of Contents
loading

Table of Contents