- simplexml_load_string: documentation ( source)
- simplexml_load_file: documentation ( source)
<?php
$xml="<root><node1>content</node1></root>";
$sxe=new simpleXMLElement($xml);
$xml="<root><node1>content</node1></root>";
$sxe=simplexml_load_string($xml);
$sxe=simplexml_load_file("filename.xml");
print $sxe->asXML();