I need to perform a nested xpath on an XML data set I have..
data:
<data>
<row id="">
<subset>
<item>
<subitem master="" tag=""></subitem>
</item>
</subset>
</row>
</data>
for every row I need go through and get the values of master and tag
so for example, for one ROW I could have several sub-items in which I'd need each id, master and tag values respectively
I know how to get either the attributes for one or the other tag but not nested together
i was using:
$doc = new domDocument();
$doc->load('data.xml');
$xpath = new DOMXpath($doc);
$data = $xpath->query('/data/row');
$count = $data->length;
for($i=0;$i<$count;$i++)
{
//echo data
}
thanks =)