Here's an example:
from elementtree import ElementTree
tree = ElementTree.XML('some xml string')
# find all nodes with tag
for node in tree.getiterator('domain'):
# get attribute ideacount's value
ideacount = node.get('ideacount')
# get text between the
domain = node.text
# find child node of foo where tag =
foo = node.find('submit')
tech = foo.get('technology') #get technology attribute
Now I just have to work on the submit process.
No comments:
Post a Comment