use warnings; use strict; use XML::Twig; my $xml = <<XML; <html> <title>four</title> <head> <title>one</title> </head> <body> <title>two</title> </body> <title>three</title> </html> XML my $twig = XML::Twig->new( twig_handlers => { 'html/head/title' => sub { print $_->text(), "\ +n" } }, ); $twig->parse($xml); __END__ one
In reply to Re: HTML::TreeBuilder::XPath returns things I don't need?
by toolic
in thread HTML::TreeBuilder::XPath returns things I don't need?
by szabgab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |