Anonymous
public text v1 · immutable$xmldoc = domxml_open_mem($xmlstr);
// get the node root and then the children of it.
$noderoot = $xmldoc->document_element();
$childnodes = $noderoot->child_nodes();
// build the array
foreach ($childnodes as $value) {
echo $value->tagname . " : " . $value->get_content() . "<br>";
$nodeArray[$value->tagname] = $value->get_content();
}