Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: HTML::TreeBuilder::XPath not loading the complete $page

by tangent (Priest)
on Mar 19, 2013 at 21:00 UTC ( #1024387=note: print w/replies, xml ) Need Help??


in reply to Re^2: HTML::TreeBuilder::XPath not loading the complete $page
in thread HTML::TreeBuilder::XPath not loading the complete $page

Are you sure there isn't something else going on? When I use your sample content it still works:
my $content = q| <html> <head> </head> <body> <DIV>Div number 12</DIV> <HTML> <HEAD> </HEAD> <BODY> <p>You have an error blah blah blah</p> </BODY> </HTML> <DIV>Div number 13</DIV> </body> </html> |; my $tree = HTML::TreeBuilder::XPath->new; $tree->parse_content( $content ); my @divs = $tree->findnodes( '/html/body/div' ); for my $div (@divs) { print $div->as_HTML . "\n"; }
Output:
<div>Div number 12</div> <div>Div number 13</div>

Replies are listed 'Best First'.
Re^4: HTML::TreeBuilder::XPath not loading the complete $page
by Lord Gartlar (Initiate) on Mar 19, 2013 at 21:26 UTC

    There are some errors displayed there inside the new HTML...

    As mentioned, I tried deleting them with a mere while and it finally worked...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1024387]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2016-10-01 18:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?






    Results (3 votes). Check out past polls.