[Tutor] Convert XML codes to "normal" text?

Eric Dorsey dorseye at gmail.com
Wed Mar 4 06:43:22 CET 2009

*So here is my program, I'm pulling some information off of my Snipt feed ..

import feedparser

d = feedparser.parse('http://snipt.net/dorseye/feed')

for i in d['entries']:
    print d['entries'][x].title
    print d['entries'][x].summary


Explode / Implode List
>>> V = list(V)
>>> V
['s', 'p', 'a', 'm', 'm', 'y']
>>> V = ''.join(V)
>>> V

I know, for example, that the > code means >, but what I don't know is
how to convert it in all my data to show properly? In all the feedparser
examples it just smoothly has the output correct (like in one the data was
<span>whatever</span> and it had the special characters just fine.) I didn't
notice any special call on their feedparser.parse() and I can't seem to find
anything in the feedparser documentation that addresses this. Has anyone run
into this before? Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090303/ce741bf0/attachment.htm>

More information about the Tutor mailing list