for node in rootNode.childNodes:
if (node.nodeName == "title"):
for title_node in node.childNodes:
if (title_node.nodeType == node.TEXT_NODE):
print " <h2 id=\"feed-title\">", title_node.nodeValue, "</h2>"
print " <hr class=\"seperator\" />"
if (node.nodeName == "entry"):
myentry = dict()
for entry_node in node.childNodes:
if (entry_node.nodeName == "title"):
for name_node in entry_node.childNodes:
if (name_node.nodeType == node.TEXT_NODE):
myentry['title'] = name_node.nodeValue
elif (entry_node.nodeName == "link"):
match = get_url.search(entry_node.toxml())
myentry['url'] = match.groupdict()['url']
elif (entry_node.nodeName == "author"):
for author_node in entry_node.childNodes:
if (author_node.nodeName == "name"):
for authname_node in author_node.childNodes:
if (authname_node.nodeType == node.TEXT_NODE):
myentry['author'] = authname_node.nodeValue
elif (entry_node.nodeName == "content"):
print "<p>get content</p>"
elif (entry_node.nodeName == "summary"):
if not len(content):
print "<p>get summary</p>"
#get summary (shouldn't do so here, cuz of "blah")
print myentry['title'], myentry['url'], myentry['author']