DOMIT! v 0.1 Tutorial
<<    index    >>
1    2    3    4    5    6    7    8    9    10    11    12    13    14    15   
16    17    18    19    20    21    22    23    24    25    26   
insertBefore

If you want to add a new cd somewhere other than to the end of the childNodes array, you can use the insertBefore method. It works just like appendChild, except you also need to include a reference to the node before which the insertion should be made:


$cdLibrary =& $cdCollection->documentElement;
$cdLibrary->insertBefore($newNode, $cdLibrary->firstChild);

The insertBefore method returns a reference to the inserted node.


Documentation generated by ClassyDoc, using the DOMIT! and SAXY parsers.
Please visit Engage Interactive to download free copies.