Hello,

I am trying to modify some of the netlib code to fit the following
scenario:

Let's say that every HTTP response with code 426 comes back with some
XML code as the reponse content.  When the response arrives, I want to
be able to

1) check about the 426 code
2) if found, to parse the XML in the response body
3) use the information to display a prompt window to the user
4) send a HTTP request with modified header lines

About 1), I inserted some code in nsHttpChannel::ProcessResponse.
About 3), I just use the nsIPromp interface. About 4), I open a
replacement HTTP channel, modify the request header and then open the
channel.  Is that the best

My question is about part 2: nsHttpTransaction::HandleContent receives
a buffer as an argument.  However, that buffer contains not only the
XML code from the body of the response, but some other XML-based code
that I don't understand.  It looks like there was something in the
buffer and then par tof it was overwritten - the XML code is not well
formed, it starts and stops abruptly.

What exactly is the buffer passed to HandleContent supposed to contain?
 Is nsHttpTransaction the best plave where I should be looking to
extract my XML code?

Also, once I do extract the text, does Mozilla have a XML parser
component, to which I can pass this text for parsing?

Regards,
Peter

_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network

Reply via email to