- var_dump: documentation ( source)
- simplexml_load_string: documentation ( source)
<?php
$xmlstr = '<Address><to>James</to><from>Jani</from><heading>Reminder</heading><body>Please check your mail.</body></Address>';
$element = simplexml_load_string($xmlstr);
echo $element->getName();
var_dump($element->children);