views:

11

answers:

0

Hello everyone. My problem is that I need to parse an HTML document chunk by chunk and add a comment in the head element of the document.

I am using C and I found that libxml2 is the best library out there for this purpose.

As I am receiving only chunks of data at a time I thought using a SAX parser would be a better option.

However, I am not sure if it's possible to add or modify the elements using SAX or not so it would be nice if you could clear this doubt of mine and also provide some code samples or references where I can find some code, as libxml2 doesn't give any code examples of how to use their SAX interface.

Thanks.