jsumners / feedparser

Automatically exported from code.google.com/p/feedparser
Other
0 stars 0 forks source link

Camelcase namespace prefixes not recognized #426

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

>>> import feedparser
>>> rawdata = """<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns:notifEntry="http://publications.europa.eu/atom/notificationEntry" 
xmlns="http://www.w3.org/2005/Atom">
    <title>Ingestion Notification Messages Response</title>
    <entry>
        <id>cellar:9ce3ccce-08cd-11e4-a454-01aa75ed71a1.0001</id>
        <notifEntry:type>CREATE</notifEntry:type>
    </entry>
</feed>"""
>>> atom = feedparser.parse(rawdata)
>>> atom.entries[0].keys()
dict_keys(['id', 'link', 'guidislink'])

What is the expected output? What do you see instead?
Expected output: dict_keys(['link', 'guidislink', 'notifentry_type', 'id'])
Actual output: dict_keys(['id', 'link', 'guidislink'])

What version of the product are you using? On what operating system?
Win7, feedparser-5.1.3, Python 3.3

Please provide any additional information below.
if I change the namespace prefix from xmlns:notifEntry to xmlns:notifentry 
everything works fine.

Thx, 
Sebastian

Original issue reported on code.google.com by sebastia...@gmail.com on 16 Jul 2014 at 7:59