| Contents > Developing ColdFusion MX Applications > Using XML and WDDX > Modifying a ColdFusion XML object > 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.
Use the following techniques to add new information to an element:
Type |
Using a function |
Using an assignment statement |
|---|---|---|
Attribute |
StructInsert( |
|
Child element |
To append:
To insert:
|
To append:
(where newChildName must be the same as newElem.XmlName and cannot be an indexed name such as name[3]) |
Use the following techniques to delete information from an element:
Type |
Using a function |
Using an assignment statement |
|---|---|---|
Property |
StructDelete( |
|
Attribute |
All attributes: StructDelete(A specific attribute: StructDelete( |
Not available |
Child element |
All children of an element: StructDelete( All children with a specific name: StructDelete( A specific child:
|
Not available |
Use the following techniques to change the contents of an element:
Type |
Using a function |
Using an assignment statement |
|---|---|---|
Property |
StructUpdate( |
|
Attribute |
StructUpdate( |
|
Child element (replace) |
(use the same value for both index entries to change one element) |
Replace first or only child named elementName:
Replace a specific child named elementName:
or
|
|
|
||
| Contents > Developing ColdFusion MX Applications > Using XML and WDDX > Modifying a ColdFusion XML object > XML document object management reference |
|
|
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.