From c58b24b374698ae8595e4aa6a810c3b345ce1625 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Thu, 17 Jul 2008 00:41:19 +0200 Subject: [PATCH] msxml3: Added ISAXContentHandler_endDocument event. --- dlls/msxml3/saxreader.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index 1cbaf415fbb..55da4dbeb7d 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -101,6 +101,25 @@ static void libxmlStartDocument(void *ctx) This->lastLine = xmlSAX2GetLineNumber(This->pParserCtxt); } +static void libxmlEndDocument(void *ctx) +{ + saxlocator *This = ctx; + HRESULT hr; + + This->lastColumn = 0; + This->lastLine = 0; + + if(This->saxreader->contentHandler) + { + hr = ISAXContentHandler_endDocument(This->saxreader->contentHandler); + if(FAILED(hr)) + { + xmlStopParser(This->pParserCtxt); + This->ret = hr; + } + } +} + /*** ISAXLocator interface ***/ /*** IUnknown methods ***/ static HRESULT WINAPI isaxlocator_QueryInterface(ISAXLocator* iface, REFIID riid, void **ppvObject) @@ -900,6 +919,7 @@ HRESULT SAXXMLReader_create(IUnknown *pUnkOuter, LPVOID *ppObj) memset(&reader->sax, 0, sizeof(xmlSAXHandler)); reader->sax.initialized = XML_SAX2_MAGIC; reader->sax.startDocument = libxmlStartDocument; + reader->sax.endDocument = libxmlEndDocument; *ppObj = &reader->lpVtbl; -- 2.11.4.GIT