>> It's working, the thing is that I don't know how to "navigate" inside the
>> XML, I read the doc but everything there regarding key-value is on
>> for-loops, I need something more direct, like:


Hi Juan,

I think you're looking for:

    http://effbot.org/zone/element.htm#searching-for-subelements

where you should be able to do something like:

    sml._xml.findtext('steamID64')

to get the text "76561198084537782".


Let's check:

###################################################################
>>> import xml.etree.ElementTree
>>> import urllib
>>> f = 
>>> urllib.urlopen("http://steamcommunity.com/profiles/76561198084537782?xml=1";)
>>> tree = xml.etree.ElementTree.ElementTree(file=f)
>>> tree.findtext('steamID64')
'76561198084537782'
###################################################################


Yup, this looks relatively straightforward.  Let us know if you hit any snags.
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to