If you decide after listening to it that you do not like your new cd, you can remove it from the DOM Document using the removeChild method.
The removeChild method takes a single parameter: a reference to the soon-to-be-removed node.
Our new cd would therefore be removed in the following way:
$cdLibrary =& $cdCollection->documentElement;
$cdLibrary->removeChild($cdLibrary->lastChild);
The removeChild method returns a reference to the removed node.
|