User Guide
XML class 189
XML.insertBefore()
Availability
Flash Media Server 2.
Usage
my_xml.insertBefore(childNode, beforeNode)
Parameters
childNode The XMLNode object to be inserted.
beforeNode The XMLNode object before the insertion point for the childNode node.
Returns
Nothing.
Description
Method; inserts a new child node into the XML object’s child list, before the beforeNode
node. If
beforeNode is not a child of my_xml, the insertion fails.
Example
The following example is an excerpt from the XML.cloneNode() example:
// Create a copy of the middle node using cloneNode().
var middle2 = middle.cloneNode(false);
// Insert the clone node into rootNode
// between the middle and youngest nodes.
rootNode.insertBefore(middle2, youngest);
XML.lastChild
Availability
Flash Media Server 2.
Usage
my_xml.lastChild
Description
Property (read-only); an XMLNode value that references the last child in the node’s child list.
The
XML.lastChild property is null if the node does not have children. This property
cannot be used to manipulate child nodes; use the
appendChild(), insertBefore(), and
removeNode() methods to manipulate child nodes.