Heres the code
[code]
XML
<accounts>
<account>
<username>test</username>
<cryptPassword>11-22-33-44-55-66-77</cryptPassword>
<created>2006-07-22T11:25:36.1512224-07:00</created>
<lastLogin>2006-07-22T22:44:00.5312464-07:00</lastLogin>
<totalGameTime>PT5H10M43.2376592S</totalGameTime>
<chars>
<char index=”0″>7263</char>
<char index=”1″>8104</char>
<char index=”2″>16593</char>
</chars>
<addressList count=”1″>
<ip>1.2.3.4</ip>
</addressList>
</account>
PHP
foreach ($xml->xpath(‘/accounts/account’) as $account) {
echo “<tr>”.
“<td>$account->username</td>”.
“<td>$account->addressList->ip</td>”.
“<td>$account->lastLogin</td>”.
“<td>$account->totalGameTime</td>”.
“</tr>”;
}
Problem is the ip shows as ->ip instead of showing the actually IP.
Using php5.
So im guessing that the xpath only goes 1 tier. Is there anyway to get around this?