I'm trying to read through an xml feed I'm getting, but I can't access the specific elements. I'm using python, and the python documentation is really unclear about what I should use.
Here is the feed:
<title>More eagle</title>
<summary>http://www.181.fm/winamp.plsstation=181eagle&amp;style=&amp;description=The%20Eagle%20(Classic ...</summary>
<link rel="alternate" href="http://mail.google.com/mail [email protected]&message_id=12995390f36c310b&view=conv&extsrc=atom" type="text/html" />
<modified>2010-07-02T22:13:51Z</modified>
<issued>2010-07-02T22:13:51Z</issued>
<id>tag:gmail.google.com,2004:1340194246143783179 </id>
And here is my current function:
def parse_xml(feed):
feedxml = minidom.parseString(feed)
name = feedxml.getElementsByTagName('name')
subject = feedxml.getElementsByTagName('title')
contents = feedxml.getElementsByTagName('summary')
return name + "\n" + subject + "\n" + contents