Populate a list from xml using python

Posted by Sam on Stack Overflow See other posts from Stack Overflow or by Sam
Published on 2010-03-31T01:37:43Z Indexed on 2010/03/31 1:43 UTC
Read the original article Hit count: 466

Filed under:
|

I have an xml file in the following format:

<food>
<desert>
cake
<desert>
</food>
<history>
currently in my belly
</history>

I want to create two list, food and text populated with cake and history in string format. Is there an easy way to do it in python?

© Stack Overflow or respective owner

Related posts about Xml

Related posts about python