i have some data in xml like:
<test a=10 b=20>Hello</test>
<test a=30 b=40>Hi</test>
how do i read value of a, b as well as Hello, and Hi. I have done some thing like:
tt = xml.findall('test')
no = len(tt)
for i in range (0, no):
print tt[i].get(a)
print tt[i].get(b)
print xml.findtext('test')
this code outputs
10 20 Hello
30 40 Hello
which is wrong for second iteration it should print "Hi" in stead of "Hello".