KenyaDonDraper / pysimplesoap

Automatically exported from code.google.com/p/pysimplesoap
0 stars 0 forks source link

How to get the elements with the same name (SimpleXMLElement) #86

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have a SimpleXMLElement such as :

span = 
SimpleXMLElement('<span><a><b>1</b><b>2</b><b>3</b></a><a><b>4</b><b>5</b><b>6</
b></a>

how can I get the values 1,2,3 of the first "a" and 4,5,6 of the second 
"a"respectively?

If I use:
 for i in span.a.b: print str(i)

it always print 123 but not 123 and 456

What is the expected output?
I expect to get:
a: 1 2 3
a: 4 5 6

Original issue reported on code.google.com by chenchen...@gmail.com on 27 Nov 2012 at 5:04

GoogleCodeExporter commented 9 years ago
This problem has been solved. Thanks.

Original comment by chenchen...@gmail.com on 28 Nov 2012 at 3:59

GoogleCodeExporter commented 9 years ago

Original comment by reingart@gmail.com on 14 Jan 2013 at 6:50