Universal Feed Parser issue

Discussion in 'Python' started by i3dmaster, Apr 10, 2007.

  1. i3dmaster

    i3dmaster Guest

    I have a sample Atom feed like this:

    <?xml version='1.0' encoding='utf-8'?>
    <feed xmlns='http://www.w3.org/2005/Atom' xmlns:foo='http://
    app.example.com/app/2007'>
    <id>http://app.example.com/fjie4id939xdl3io23</id>
    <title type='text'>foo</title>
    <author>
    <name>bar</name>
    <email></email>
    </author>
    <updated>2007-04-09T22:14:15.000Z</updated>
    <link rel='http://app.example.com/#event' type='application/atom
    +xml' href='http://www.foo.com/app/feeds/#app1'></link>
    <foo:timezone value='America/Mountain'></foo:timezone>
    <foo:status value='confirmed'></foo:status>
    </feed>

    After parsed by feedparser, the timezone element does not get the
    attribute "America/Mountain". Same thing on status element. This does
    not sound an expected result. I am wondering if it should be
    considered a bug...
    i3dmaster, Apr 10, 2007
    #1
    1. Advertising

  2. En Tue, 10 Apr 2007 14:58:42 -0300, i3dmaster <>
    escribió:

    > I have a sample Atom feed like this:
    >
    > <?xml version='1.0' encoding='utf-8'?>
    > <feed xmlns='http://www.w3.org/2005/Atom' xmlns:foo='http://
    > app.example.com/app/2007'> ...
    > <foo:timezone value='America/Mountain'></foo:timezone>
    > <foo:status value='confirmed'></foo:status>
    > </feed>
    >
    > After parsed by feedparser, the timezone element does not get the
    > attribute "America/Mountain". Same thing on status element. This does
    > not sound an expected result. I am wondering if it should be
    > considered a bug...


    Usually it's a good idea to read the documentation...
    http://www.feedparser.org/docs/namespace-handling.html

    --
    Gabriel Genellina
    Gabriel Genellina, Apr 11, 2007
    #2
    1. Advertising

  3. i3dmaster

    i3dmaster Guest

    On Apr 10, 6:45 pm, "Gabriel Genellina" <>
    wrote:
    > En Tue, 10 Apr 2007 14:58:42 -0300, i3dmaster <>
    > escribió:
    >
    > > I have a sample Atom feed like this:

    >
    > > <?xml version='1.0' encoding='utf-8'?>
    > > <feed xmlns='http://www.w3.org/2005/Atom'xmlns:foo='http://
    > > app.example.com/app/2007'> ...
    > > <foo:timezone value='America/Mountain'></foo:timezone>
    > > <foo:status value='confirmed'></foo:status>
    > > </feed>

    >
    > > After parsed by feedparser, the timezone element does not get the
    > > attribute "America/Mountain". Same thing on status element. This does
    > > not sound an expected result. I am wondering if it should be
    > > considered a bug...

    >
    > Usually it's a good idea to read the documentation... http://www.feedparser.org/docs/namespace-handling.html
    >
    > --
    > Gabriel Genellina



    I did. Perhaps its because of not 100% atom compatible of my feed
    format? See if I use gnosis xml utility to parse it, it works fine
    though...
    i3dmaster, Apr 11, 2007
    #3
  4. En Wed, 11 Apr 2007 01:51:13 -0300, i3dmaster <>
    escribió:

    > On Apr 10, 6:45 pm, "Gabriel Genellina" <>
    > wrote:
    >> En Tue, 10 Apr 2007 14:58:42 -0300, i3dmaster <>
    >> escribió:
    >>
    >> > <?xml version='1.0' encoding='utf-8'?>
    >> > <feed xmlns='http://www.w3.org/2005/Atom'xmlns:foo='http://
    >> > app.example.com/app/2007'> ...
    >> > <foo:timezone value='America/Mountain'></foo:timezone>
    >> > <foo:status value='confirmed'></foo:status>
    >> > </feed>

    >>
    >> > After parsed by feedparser, the timezone element does not get the
    >> > attribute "America/Mountain". Same thing on status element. This does
    >> > not sound an expected result. I am wondering if it should be
    >> > considered a bug...

    >>
    >> Usually it's a good idea to read the documentation...
    >> http://www.feedparser.org/docs/namespace-handling.html

    >
    > I did. Perhaps its because of not 100% atom compatible of my feed
    > format? See if I use gnosis xml utility to parse it, it works fine
    > though...


    The link above answers *exactly* your question - have you actually read
    the page?

    --
    Gabriel Genellina
    Gabriel Genellina, Apr 11, 2007
    #4
  5. i3dmaster

    i3dmaster Guest

    On Apr 11, 12:06 am, "Gabriel Genellina" <>
    wrote:
    > En Wed, 11 Apr 2007 01:51:13 -0300, i3dmaster <>
    > escribió:
    >
    >
    >
    > > On Apr 10, 6:45 pm, "Gabriel Genellina" <>
    > > wrote:
    > >> En Tue, 10 Apr 2007 14:58:42 -0300, i3dmaster <>
    > >> escribió:

    >
    > >> > <?xml version='1.0' encoding='utf-8'?>
    > >> > <feed xmlns='http://www.w3.org/2005/Atom'xmlns:foo='http://
    > >> > app.example.com/app/2007'> ...
    > >> > <foo:timezone value='America/Mountain'></foo:timezone>
    > >> > <foo:status value='confirmed'></foo:status>
    > >> > </feed>

    >
    > >> > After parsed by feedparser, the timezone element does not get the
    > >> > attribute "America/Mountain". Same thing on status element. This does
    > >> > not sound an expected result. I am wondering if it should be
    > >> > considered a bug...

    >
    > >> Usually it's a good idea to read the documentation...
    > >>http://www.feedparser.org/docs/namespace-handling.html

    >
    > > I did. Perhaps its because of not 100% atom compatible of my feed
    > > format? See if I use gnosis xml utility to parse it, it works fine
    > > though...

    >
    > The link above answers *exactly* your question - have you actually read
    > the page?
    >
    > --
    > Gabriel Genellina


    Hmm... well I don't know if I made my question clear then or you might
    have misread it?... Anyway, the namespace handling wasn't the issue
    of this question. feedparser handles it as expected but only when
    there is a text value associated with it. Look at the rdf file you
    will see the prism:issn element has a text value but in my case, the
    foo:timezone element DOES NOT have a text value but a Attribute or
    maybe attributes... What it looks like is feedparser simply ignores
    all the attributes when parsing it. This behavior wasn't seen from
    other xml parsers though.
    i3dmaster, Apr 11, 2007
    #5
  6. i3dmaster

    i3dmaster Guest

    On Apr 11, 12:06 am, "Gabriel Genellina" <>
    wrote:
    > En Wed, 11 Apr 2007 01:51:13 -0300, i3dmaster <>
    > escribió:
    >
    >
    >
    > > On Apr 10, 6:45 pm, "Gabriel Genellina" <>
    > > wrote:
    > >> En Tue, 10 Apr 2007 14:58:42 -0300, i3dmaster <>
    > >> escribió:

    >
    > >> > <?xml version='1.0' encoding='utf-8'?>
    > >> > <feed xmlns='http://www.w3.org/2005/Atom'xmlns:foo='http://
    > >> > app.example.com/app/2007'> ...
    > >> > <foo:timezone value='America/Mountain'></foo:timezone>
    > >> > <foo:status value='confirmed'></foo:status>
    > >> > </feed>

    >
    > >> > After parsed by feedparser, the timezone element does not get the
    > >> > attribute "America/Mountain". Same thing on status element. This does
    > >> > not sound an expected result. I am wondering if it should be
    > >> > considered a bug...

    >
    > >> Usually it's a good idea to read the documentation...
    > >>http://www.feedparser.org/docs/namespace-handling.html

    >
    > > I did. Perhaps its because of not 100% atom compatible of my feed
    > > format? See if I use gnosis xml utility to parse it, it works fine
    > > though...

    >
    > The link above answers *exactly* your question - have you actually read
    > the page?
    >
    > --
    > Gabriel Genellina


    Hmm... well I don't know if I made my question clear then or you might
    have misread it?... Anyway, the namespace handling wasn't the issue
    of this question. feedparser handles it as expected but only when
    there is a text value associated with it. Look at the rdf file you
    will see the prism:issn element has a text value but in my case, the
    foo:timezone element DOES NOT have a text value but a Attribute or
    maybe attributes... What it looks like is feedparser simply ignores
    all the attributes when parsing it. This behavior wasn't seen from
    other xml parsers though.
    i3dmaster, Apr 11, 2007
    #6
  7. En Wed, 11 Apr 2007 14:07:15 -0300, i3dmaster <>
    escribió:

    > Hmm... well I don't know if I made my question clear then or you might
    > have misread it?... Anyway, the namespace handling wasn't the issue
    > of this question. feedparser handles it as expected but only when
    > there is a text value associated with it. Look at the rdf file you
    > will see the prism:issn element has a text value but in my case, the
    > foo:timezone element DOES NOT have a text value but a Attribute or
    > maybe attributes... What it looks like is feedparser simply ignores
    > all the attributes when parsing it. This behavior wasn't seen from
    > other xml parsers though.


    Oh, sorry! I thought you were complaining about the namespace.
    You're out of luck with this parser - see my own reply on January for a
    similar issue:
    http://mail.python.org/pipermail/python-list/2007-January/422237.html

    --
    Gabriel Genellina
    Gabriel Genellina, Apr 11, 2007
    #7
  8. i3dmaster

    i3dmaster Guest

    On Apr 11, 12:01 pm, "Gabriel Genellina" <>
    wrote:
    > En Wed, 11 Apr 2007 14:07:15 -0300, i3dmaster <>
    > escribió:
    >
    > > Hmm... well I don't know if I made my question clear then or you might
    > > have misread it?... Anyway, the namespace handling wasn't the issue
    > > of this question. feedparser handles it as expected but only when
    > > there is a text value associated with it. Look at the rdf file you
    > > will see the prism:issn element has a text value but in my case, the
    > > foo:timezone element DOES NOT have a text value but a Attribute or
    > > maybe attributes... What it looks like is feedparser simply ignores
    > > all the attributes when parsing it. This behavior wasn't seen from
    > > other xml parsers though.

    >
    > Oh, sorry! I thought you were complaining about the namespace.
    > You're out of luck with this parser - see my own reply on January for a
    > similar issue:http://mail.python.org/pipermail/python-list/2007-January/422237.html
    >
    > --
    > Gabriel Genellina



    Ok no problem. Back to my original question, should this be considered
    a bug (didn't see a bug reported though) ? Do you know if the
    developer is considering fixing it in the future?

    Thanks,
    Jim
    i3dmaster, Apr 12, 2007
    #8
  9. En Thu, 12 Apr 2007 00:23:36 -0300, i3dmaster <>
    escribió:

    > Ok no problem. Back to my original question, should this be considered
    > a bug (didn't see a bug reported though) ? Do you know if the
    > developer is considering fixing it in the future?


    I have no idea! The bug was reported more than a year ago:
    http://sourceforge.net/tracker/?func=browse&group_id=112328&atid=661937
    with no comments from the developer...
    Why don't you switch to a more general and supported tool, like
    ElementTree?

    --
    Gabriel Genellina
    Gabriel Genellina, Apr 12, 2007
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stephen Briley

    question on HTMLParser and parser.feed()

    Stephen Briley, Dec 6, 2003, in forum: Python
    Replies:
    1
    Views:
    515
    Peter Otten
    Dec 6, 2003
  2. Jacob Friis Larsen
    Replies:
    0
    Views:
    335
    Jacob Friis Larsen
    Aug 5, 2004
  3. Replies:
    3
    Views:
    382
    Gabriel Genellina
    Jan 12, 2007
  4. Florian Lindner

    RSS feed parser

    Florian Lindner, Apr 2, 2007, in forum: Python
    Replies:
    4
    Views:
    415
    Florian Lindner
    Apr 4, 2007
  5. Virgil Stokes
    Replies:
    0
    Views:
    461
    Virgil Stokes
    Feb 7, 2011
Loading...

Share This Page