wintermute_115 has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to parse RSS feeds with XML::RSS::Parser, and it's mostly working fine, except that I need to be able to pull the content of elements in the itunes namespace and nothing I can think of seems to work.
If I'm trying to read the element itunes:summary (it will be en object of type XML::RSS::Parser::Element), for example, I've tried:
and some other things I don't remember. But everything I try, it ether returns undef or I get told Bad call to match: '<XXX>' contains unknown token.$summary = $element->query('itunes:summary'); $summary = $element->query('{http://www.itunes.com/dtds/podcast-1.0.dt +d}summary'); $summary = $element->query('summary') $summary = $element->query(process_name('itunes:summary'): $summary = $element->query(process_name('{http://www.itunes.com/dtds/p +odcast-1.0.dtd}summary'):
Does anyone know how this works? Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: namespaces in XML::RSS::Parser::Element
by choroba (Cardinal) on Apr 11, 2024 at 23:25 UTC | |
by wintermute_115 (Novice) on Apr 11, 2024 at 23:35 UTC | |
|
Re: namespaces in XML::RSS::Parser::Element
by choroba (Cardinal) on Apr 11, 2024 at 16:05 UTC | |
by wintermute_115 (Novice) on Apr 11, 2024 at 17:17 UTC |