how parse xml with many roots on php



I wanna read a XML but this XML have many roots in the same XML:



[obtenerResult] =>
<?xml version="1.0" encoding="utf-8"?>
<node1>
<node2></node2>
</node1>
<?xml version="1.0" encoding="utf-8"?>
<node4>
<node5></node5>
</node4>


How can read the nodes with simplexml on PHP.


I try $rXML=simplexml_load_string($result->obtenerResult->node4); but dont working


Thank you for your help.


No comments:

Post a Comment