Universal Feed Parser issue

I

i3dmaster

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 protected]</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...
 
G

Gabriel Genellina

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
 
G

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...

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

i3dmaster

En Wed, 11 Apr 2007 01:51:13 -0300, i3dmaster <[email protected]>
escribió:





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

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.
 
I

i3dmaster

En Wed, 11 Apr 2007 01:51:13 -0300, i3dmaster <[email protected]>
escribió:





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

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.
 
G

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.

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top