
XML.removeNode() Method
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
944
|
ActionScript Language Reference
XML.removeNode() Method
delete a node from an XML object hierarchy
Flash 5
theNode.removeNode()
Description
The removeNode() method deletes theNode from an XML document, where theNode can be
an XML or XMLnode instance. All descendants (children, grandchildren, and so on) of
theNode are also deleted. The childNodes property of theNode’s parent is automatically
updated to reflect the new structure of the remaining object hierarchy.
Example
Here we delete the second child node; the third child node takes its place:
myDoc = new XML("<P>one</P><P>two</P><P>three</P>");
myDoc.childNodes[1].removeNode();
trace(myDoc); // Displays: "<P>one</P><P>three</P>"
See Also
XML.appendChild(), XML.insertBefore()
XML.send() Method
send XML source code to an external script or application
Flash 5
xmlDoc.send(url, window)
Arguments
url A string specifying the location of a script or application to which xmlDoc
should be sent.
window A required string specifying the name of the browser window or frame into
which to load the script’s response. It can be a custom name or one of the
four presets: “
_blank”, “_ parent”, “_self”, or “_top”. For details, see the
description of the window settings under the getURL() global function.
Description
The send() method converts ...