Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Help with HTML::StripScripts::Parser

by tobyink (Abbot)
on Aug 07, 2012 at 19:49 UTC ( #986068=note: print w/ replies, xml ) Need Help??


in reply to Help with HTML::StripScripts::Parser

Personally, I'd do it this way...

use HTML::HTML5::Parser; use XML::LibXML 1.94; use XML::LibXML::QuerySelector; my $document = HTML::HTML5::Parser->load_html(IO => \*DATA); $document -> querySelectorAll('h1, h2') -> foreach(sub { $_->setNodeName('div') }); print $document->toString; __DATA__ <ol id="intelliTxt" class="steps"> <li class="section"> <h2 class="header Heading3">Clear Up Those Blackheads</h2> <ul> <li class="step "> <span class="stepNumber">1</span>
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'


Comment on Re: Help with HTML::StripScripts::Parser
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2014-11-29 06:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (203 votes), past polls