in reply to extract tag content from VLC webserver via XML::Rules
Keeping your code as is your could just change this part:
my $parser = XML::Rules->new( stripspaces => 7, rules => { info => sub { print "$_[1]->{_content}\n" if $_[1]->{name} eq 'now_playing'; # <- return; }, } ); $parser->parse( $xml);
which prints for me in your example:
John Williams-Losing E.T.-E.T. The Extra-Terrestrial: 20th Anniversary
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: extract tag content from VLC webserver via XML::Rules
by rainforest1155 (Initiate) on Jun 25, 2013 at 16:05 UTC | |
by rainforest1155 (Initiate) on Jun 25, 2013 at 17:12 UTC | |
by vagabonding electron (Curate) on Jun 25, 2013 at 18:19 UTC | |
by mcoblentz (Scribe) on Jun 26, 2013 at 15:38 UTC | |
by rainforest1155 (Initiate) on Jun 27, 2013 at 11:13 UTC |
In Section
Seekers of Perl Wisdom