SimpleXML Problems Example - Interop with DOM
simplexml_problems_interop.php:
<?php 
//load xml
$books simplexml_load_string('<body>
This is a text with a <strong>bold</strong> and <em>italics</em> part
 and a <strong>second bold </strong> one.
</body>'
);
//import into dom
$dom dom_import_simplexml($books);
print 
$dom->nodeName ."\n";
//import it back to simplexml
$simplexml simplexml_import_dom($dom);
print 
$simplexml ."\n";

?> 

 
SimpleXML Problems Example - Interop with DOM © copyright 2004  Bitflux GmbH