in reply to Re^2: Some issues with WWW::Mechanize::Firefox->xpath() method (xpath 1.0)
in thread Some issues with WWW::Mechanize::Firefox->xpath() method
Works for me (using XML::XSH2):
And you're sure that's not an xsh2 function/feature?
Produces no output for me
#!/usr/bin/perl -- use strict; use warnings; use XML::LibXML; my $html = <<'__HTML__'; <html> <head> <title>Hello Firefox!</title> </head> <body> <h1>Hello <b>World</b>!</h1> <p id='paragraph'>Hello <b>WWW::Mechanize::Firefox</b> Goob bye</p> </body> </html> __HTML__ my $dom = XML::LibXML->new( qw/ recover 2 / )->load_html( #~ string => \$html, ## BUG! scalar... not like load_xml string => $html, ); local $\ = $/; print for $dom->findnodes(q{ substring(//p,1,4) }); ## nada print for $dom->findnodes(q{ //p }); ## paragraph
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Some issues with WWW::Mechanize::Firefox->xpath() method (xpath 1.0)
by choroba (Cardinal) on Apr 02, 2013 at 11:15 UTC | |
by Corion (Patriarch) on Apr 02, 2013 at 11:30 UTC | |
by Anonymous Monk on Apr 02, 2013 at 11:35 UTC |