#37 channel.getElementValue fails when namespace declared twice

open
5
2007-06-27
2007-02-14
themodernlife
No

Some of the cnn podcasts available at http://www.cnn.com/services/podcasting/ look like this:

<rss xmlns:itunes="http://www.itunes.com/DTDs/Podcast-1.0.dtd" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
<channel>
...
<itunes:summary>She does more on her ride to work than most people do all day.</itunes:summary>
...
<item>
<itunes:keywords xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">News & Politics</itunes:keywords>
...

using getElementValue doesn't work to get the second one.

for instance:

channel.getElementValue("itunes:summary") will return the right string, but

channel.getElementValue("//item/itunes:keywords") just returns null.

i checked that if you remove the redundant namespace declaration everything works as expected.

The feed i noticed this one was http://rss.cnn.com/services/podcasting/cnnnewsroom/rss.xml

tested with informa-0.7.0-alpha

Discussion

  • Niko Schmuck
    Niko Schmuck
    2007-06-27

    • assigned_to: niko_schmuck --> wieben