note
Anonymous Monk
<P>See [id://890907|Re: Help With Online Table Scraper], [id://895706|Re: Formating a HTML document to show certain text.]
<P><div class="codeblock"><tt class="codetext">
$ [mod://lwp-download] "http://perlmonks.com/?abspart=1;displaytype=displaycode;node_id=934485;part=1" junk.html
<BR>281 bytes received</tt></div>
<P><div class="codeblock"><tt class="codetext">
$ perl [id://865792|htmltreexpather.pl] junk.html _tag a</tt></div>
<C>HTML::Element=HASH(0xb31bcc) 0.1.0
John.Martines
/html/body/a
/html/body/a
/html/body/a[@href='page.aspx?a=c4bc46eswsdw32fcc']
------------------------------------------------------------------
HTML::Element=HASH(0xb31d2c) 0.1.1.0.0
Mary Jones
/html/body/ul/li/a
/html/body/ul/li/a
/html/body/ul/li/a[@href='page.aspx?a=0a2b-a99d-3754eb2f5e35']
------------------------------------------------------------------
HTML::Element=HASH(0xb31e0c) 0.1.1.1.0
Fernando Praderas
/html/body/ul/li[2]/a
/html/body/ul/li[2]/a
/html/body/ul/li[2]/a[@href='page.aspx?a=1ef7b100-8dc4-4b40-871c-68b1d0']
------------------------------------------------------------------
##################################################################
</C>
<P>[mod://HTML::Query]<C>
use HTML::Query qw{ Query };
print "$_\n" for Query(
file => q{junk.html}
)->query(
q{a[href~=page.aspx]}
)->as_text ;
__END__
John.Martines
Mary Jones
Fernando Praderas
</c>
934485
934485
11