Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Dynamically cleaning up HTML fragments

by trwww (Priest)
on Sep 24, 2010 at 07:34 UTC ( [id://861743]=note: print w/replies, xml ) Need Help??


in reply to Dynamically cleaning up HTML fragments

I think the default driver for SAX checks for well-formed-ness of the input before forwarding the events.

I provided an example for someone looking to do something similar back in Re: Simplify HTML programatically. There you can see how to start your pipeline using the HTML driver.

  • Comment on Re: Dynamically cleaning up HTML fragments

Replies are listed 'Best First'.
Re^2: Dynamically cleaning up HTML fragments
by SilasTheMonk (Chaplain) on Sep 24, 2010 at 09:39 UTC
    Yes I looked at that node as you can see from my original post. I tried your example which worked as far as it went. However I could not see what the HTML driver actually contributed, and since it depends on HTML::TreeBuilder all the advantages of using a SAX parser are undermined. My example (which also worked upto a point) did not have a dependency. My example only broke down when I tried to address the closing "img" issue. If you know how to fix that I would really appreciate it.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-20 03:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found