61
rated 0 times
[
65]
[
4]
/ answers: 1 / hits: 15117
/ 13 Years ago, thu, february 23, 2012, 12:00:00
I'm experimenting with this xml:
<theFeed>
<games>
<game id=103 period= clock=>
<team id=657 type=home logo=1/12 score=46/>
<team id=740 type=visitor seed=11 score=59/>
</game>
</games>
</theFeed>
and I'm trying to get the attribute score from the first child of the game node, but when I use this code(javascript):
var Hlogo = theXml.getElementsByTagName('game')[0].childNodes[0].getAttribute('score');
it crashes. I can get attributes from the parent just fine using getAttributes
...
is there something I'm doing wrong?
More From » xml