in reply to namespaces in XML::RSS::Parser::Element

Can you also paste an example of the RSS you're trying to process?

Update: Also, what is $element? Even the synopsis shows you should use XPath for queries, maybe you should involve some kind of axis, like //itunes:summary.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: namespaces in XML::RSS::Parser::Element
by wintermute_115 (Novice) on Apr 11, 2024 at 17:17 UTC

    $element is being generated by foreach my $element ($rss->query('//item')) to grab individual items from within the RSS feed.

    I've never worked with XPath before, but based on the Wikipedia page it looks like my $summary = $element->query('//itunes:summary'); ought to work, but it's still returning undef.