I was expecting this to print 'one', but instead it printed 'fouronetwothree'. Am I misunderstand what XPath is supposed to do?use 5.010; use HTML::TreeBuilder::XPath; my $tree= HTML::TreeBuilder::XPath->new; my $html = <<'HTML'; <html> <title>four</title> <head> <title>one</title> </head> <body> <title>two</title> </body> <title>three</title> </html> HTML $tree->parse($html); say $tree->findvalue( '/html/head/title');
Should I use some other module?
In reply to HTML::TreeBuilder::XPath returns things I don't need? by szabgab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |