Skip to content
Snippets Groups Projects
Commit 119129d7 authored by Khaled Noaman's avatar Khaled Noaman
Browse files

SAX2 documentation update.

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@173650 13f79535-47bb-0310-9956-ffa450edef68
parent 071ab492
No related branches found
No related tags found
No related merge requests found
...@@ -37,19 +37,25 @@ ...@@ -37,19 +37,25 @@
parser->parse(xmlFile); parser->parse(xmlFile);
} }
catch (const XMLException& toCatch) { catch (const XMLException& toCatch) {
delete parser;
cout << "Exception message is: \n" cout << "Exception message is: \n"
<< DOMString(toCatch.getMessage()) << "\n" ; << DOMString(toCatch.getMessage()) << "\n" ;
return -1; return -1;
} }
catch (const SAXParseException& toCatch) { catch (const SAXParseException& toCatch) {
delete parser;
cout << "Exception message is: \n" cout << "Exception message is: \n"
<< DOMString(toCatch.getMessage()) << "\n" ; << DOMString(toCatch.getMessage()) << "\n" ;
return -1; return -1;
} }
catch (...) { catch (...) {
delete parser;
cout << "Unexpected Exception \n" ; cout << "Unexpected Exception \n" ;
return -1; return -1;
} }
delete parser;
return 0;
}</source> }</source>
</s2> </s2>
......
...@@ -56,8 +56,11 @@ ...@@ -56,8 +56,11 @@
/* /*
* $Log$ * $Log$
* Revision 1.1 2002/02/01 22:22:09 peiyongz * Revision 1.2 2002/05/07 17:45:52 knoaman
* Initial revision * 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 * Revision 1.3 2000/08/30 22:21:37 andyh
* Unix Build script fixes. Clean up some UNIX compiler warnings. * Unix Build script fixes. Clean up some UNIX compiler warnings.
...@@ -79,6 +82,15 @@ ...@@ -79,6 +82,15 @@
#include <xercesc/parsers/SAX2XMLReaderImpl.hpp> #include <xercesc/parsers/SAX2XMLReaderImpl.hpp>
#include <xercesc/sax/SAXException.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 class SAX2_EXPORT XMLReaderFactory
{ {
protected: // really should be private, but that causes compiler warnings. protected: // really should be private, but that causes compiler warnings.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment