Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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 studying the Monastery: (12)
As of 2015-07-06 19:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (81 votes), past polls