ElementTree, how to get the whole content of a tag

Damjan gdamjan at gmail.com
Wed Mar 16 17:13:05 EST 2005


Given the folowing XML snippet, I build an ElementTree instance with
et=ElementTree.fromstring(..). Now et.text returns just '\n  text\n  some
other text'. 
Is there any way I could get everything between the <div> and </div> tag?

<div>
  text
  some other text<br/>
  and then some more
</div>


-- 
damjan



More information about the Python-list mailing list