[SP-pm] XML::RSS::Parser

Daniel de Oliveira Mantovani daniel.oliveira.mantovani at gmail.com
Thu Sep 25 08:02:35 PDT 2008


Boa tarde para todos.

Não sei o que por em alguns campos do módulo.

#!/usr/bin/perl

use warnings;
use strict;
use XML::RSS::Parser;

my $p = XML::RSS::Parser->new;
my $feed = $p->parse_uri('http://www.movies.com/xml/intheaters.xml');

# output some values
my $feed_title = $feed->query('*/channel/title*');
print $feed_title->text_content;
my $count = $feed->item_count;
print " ($count)\n";
foreach my $i ( $feed->query('*//item'*) ) {
    my $node = $i->query(*'title*');
    print '  '.$node->text_content;
    print "\n";
}

Os que estão em negrito.

Obrigado.

-- 
Daniel de Oliveira Mantovani
"A sede pelo aprendizado é insaciável"
http://mantovanihouse.blogspot.com/
------------------------------------------------------------
-------------- Pr?xima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://mail.pm.org/pipermail/saopaulo-pm/attachments/20080925/1506af2f/attachment.html>


More information about the SaoPaulo-pm mailing list