in reply to Re^2: Parsing Item Tag from RSS feed
in thread Parsing Item Tag from RSS feed
You are making things up that do not at all match any kind of documentation. That's not how programming works.
The following code works for me, and all I needed to do was to read the documentation of XML::LibXML.
#!/usr/bin/perl -w use strict; use warnings; use XML::LibXML; my $html_link = "http://rss.news.yahoo.com/rss/topstories"; my $dom = XML::LibXML->load_xml(location => $html_link); my $xp = XML::LibXML::XPathContext->new($dom); my @nodes = $xp->findnodes("/rss/channel/item"); print $_->toString for @nodes;
As you haven't told us why you use XML::RSS::LibXML, I have removed it from the code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Parsing Item Tag from RSS feed
by mr_p (Scribe) on Jul 12, 2010 at 21:07 UTC |