May 2001
Intermediate to advanced
720 pages
23h 24m
English
XML.removeNode( ) Method — delete a node from an XML object hierarchy
Flash 5
theNode.removeNode( )
The removeNode( ) method deletes
theNode from an
XML document.
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.
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>"
XML.appendChild( )
Read now
Unlock full access