Hello everyone.
I am in a kind of an weird condition in my code. I am writing an Apache module that needs to add a comment in the head tag of the response document (apart from doing some other unimportant stuff).
At the point where I need to parse the response document, I have the whole document in memory in the form of a char * buffer (I am using C). So I am not quite sure which API to choose?
DOM as I know, will create its own in memory tree representation of the document. I can save some memory space by freeing up the earlier buffer.
SAX: I really don't understand it quite well.
XPath- as I have searched around, I believe it can only be used to retrieve element values . If this is true, then its none of my use.
Give me some insights, as what is best suited to the current situation ?