User Guide

Table Of Contents
860 Chapter 35: Using XML and WDDX
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:
Deleting information from an element
Use the following techniques to delete information from an element:
ArrayIsEmpty(elemPath.elemName)
Always returns False.
ArrayToList(elemPath.elemName, n)
Returns a comma separated list of all the XmlText
properties of all the children of
elemPath named
elemName.
Type Using a function Using an assignment statement
Attribute
StructInsert(xmlElemPath.XmlAttributes,
"key", "value")
xmlElemPath.XmlAttributes.key =
"value"
xmlElemPath.XmlAttributes["key"]
= "value"
Child
element
To append:
ArrayAppend(xmlElempath.XmlChildren,
newElem)
To insert:
ArrayInsertAt(xmlElempath.
XmlChildren, position, newElem)
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])
Type Using a function Using an assignment statement
Property
StructDelete(xmlElemPath, propertyName) xmlElemPath.propertyName=""
Array function Result