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.