Adding
Use the following techniques to add new information to an element:
Type
Using a function
StructInsert
Attribute
"key", "value")
Child
To append:
element
ArrayAppend
newElem)
To insert:
ArrayInsertAt
XmlChildren, position, newElem)
Deleting
Use the following techniques to delete information from an element:
Type
Using a function
StructDelete
Property
Attribute
All attributes:
StructDelete(xmlElemPath, XmlAttributes)
A specific attribute:
StructDelete(xmlElemPath.XmlAttributes,
"attributeName")
Child
All children of an element:
element
StructDelete(xmlElemPath, "XmlChildren")
or
ArrayClear
All children with a specific name:
StructDelete(xmlElementpath,
"elemName")
ArrayClear(xmlElemPath.elemName)
A specific child:
ArrayDeleteAt
position)
ArrayDeleteAt(xmlElemPath.elemName,
position)
684
Chapter 31: Using XML and WDDX
(xmlElemPath.XmlAttributes,
(xmlElempath.XmlChildren,
(xmlElempath.
(xmlElemPath, propertyName)
(xmlElemPath.XmlChildren)
(xmlElemPath.XmlChildren,
Using an assignment statement
xmlElemPath.XmlAttributes.key =
"value"
xmlElemPath.XmlAttributes["key"]
= "value"
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])
Using an assignment statement
xmlElemPath.propertyName=""
Not available
Not available
Need help?
Do you have a question about the COLDFUSION MX 61-DEVELOPING COLDFUSION MX and is the answer not in the manual?
Questions and answers