Since there is a complete interoperability between a DOM object and the corresponding SimpleXML object, you may be tempted to interchange both in order to get the best of the two worlds to achieve a given task.
If so, be aware that syntax of DOM and SimpleXML are, unfortunatly, not interoperable in most cases.
Consider for example the syntax to return a nodelist in both DOM and SimpleXML (in the following example the root tag is supposed to be "<racine>"):
<?php
$doc = new DomDocument;
$doc->loadXML($str);
foreach ($doc->documentElement->childNodes as $child)
{ $sxml = simplexml_import_dom($doc);
foreach ($sxml->racine->children() as $child)
{ ?>
Nota : There is certainly some reason the php5 team chose to not unify DOM and SimpleXML and I am not able, technicaly, to discuss that choice. It would just be nice if a comparative table of syntaxes/methodes in DOM and SimpleXML was made available somewhere. Even if not comparative, simply a table of all available methods in the DOM API and SimpleXML API would be of great help.