From 119129d79d30b9c89a5da62e4d70e472d905c110 Mon Sep 17 00:00:00 2001 From: Khaled Noaman <knoaman@apache.org> Date: Tue, 7 May 2002 17:45:52 +0000 Subject: [PATCH] SAX2 documentation update. git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@173650 13f79535-47bb-0310-9956-ffa450edef68 --- doc/program-sax2.xml | 6 ++++++ src/xercesc/sax2/XMLReaderFactory.hpp | 16 ++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/doc/program-sax2.xml b/doc/program-sax2.xml index 558768912..500b8f54a 100644 --- a/doc/program-sax2.xml +++ b/doc/program-sax2.xml @@ -37,19 +37,25 @@ parser->parse(xmlFile); } catch (const XMLException& toCatch) { + delete parser; cout << "Exception message is: \n" << DOMString(toCatch.getMessage()) << "\n" ; return -1; } catch (const SAXParseException& toCatch) { + delete parser; cout << "Exception message is: \n" << DOMString(toCatch.getMessage()) << "\n" ; return -1; } catch (...) { + delete parser; cout << "Unexpected Exception \n" ; return -1; } + + delete parser; + return 0; }</source> </s2> diff --git a/src/xercesc/sax2/XMLReaderFactory.hpp b/src/xercesc/sax2/XMLReaderFactory.hpp index 9c36541f1..852fb9ee8 100644 --- a/src/xercesc/sax2/XMLReaderFactory.hpp +++ b/src/xercesc/sax2/XMLReaderFactory.hpp @@ -56,8 +56,11 @@ /* * $Log$ - * Revision 1.1 2002/02/01 22:22:09 peiyongz - * Initial revision + * Revision 1.2 2002/05/07 17:45:52 knoaman + * SAX2 documentation update. + * + * Revision 1.1.1.1 2002/02/01 22:22:09 peiyongz + * sane_include * * Revision 1.3 2000/08/30 22:21:37 andyh * Unix Build script fixes. Clean up some UNIX compiler warnings. @@ -79,6 +82,15 @@ #include <xercesc/parsers/SAX2XMLReaderImpl.hpp> #include <xercesc/sax/SAXException.hpp> +/** + * Creates a SAX2 parser (SAX2XMLReader). + * + * <p>Note: The parser object returned by XMLReaderFactory is owned by the + * calling users, and it's the responsiblity of the users to delete that + * parser object, once they no longer need it.</p> + * + * @see SAX2XMLReader#SAX2XMLReader + */ class SAX2_EXPORT XMLReaderFactory { protected: // really should be private, but that causes compiler warnings. -- GitLab