msxml3: Added ISAXContentHandler_startDocument evenet (3/12)

Piotr Caban piotr.caban at gmail.com
Thu Jul 17 03:50:49 CDT 2008


On Thursday 17 of July 2008 04:07:29 you wrote:
> "Piotr Caban" <piotr.caban at gmail.com> wrote in message
> news:200807170041.01333.piotr.caban at gmail.com... +/*** LibXML callbacks
> ***/
> +static void libxmlStartDocument(void *ctx)
> +{
> + saxlocator *This = ctx;
> + HRESULT hr;
> +
> + if(This->saxreader->contentHandler)
> + {
> + hr = ISAXContentHandler_startDocument(This->saxreader->contentHandler);
> + if(FAILED(hr))
> + {
> + xmlStopParser(This->pParserCtxt);
> + This->ret = hr;
> + }
> Hi Piotr,
>
> Should This->ret be set on a non-error?
When ISAXErrorHandler is not registered ISAXXMLReader_parse stops only when 
ISAXContentHandler returns negative value. This is why the parser is stopped 
and return value is set only if FAILED(hr) returns true.
I don't know how it works when ISAXErrorHandler is registered. I will check it 
when adding the interface.
When ISAXXMLReader_parse parses whole document S_OK is returned. In this case 
This->ret should not be changed.
>
> Best Regards
>  Alistair Leslie-Hughes
Regards,
Piotr Caban



More information about the wine-devel mailing list