Init/Term calls, as outlined in the FAQ are supposed to be on a per-process
basis. You cannot do any more parses after calling Terminate().
--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
[EMAIL PROTECTED]
http://www.charmedquark.com
"Why put off until tomorrow what you can
put off until the day after tomorrow?"
----- Original Message -----
From: "niqlas niqlas" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 15, 2001 12:58 AM
Subject: parsing several xmls
> i try to parse several xml-documents using XERCES-SAX2-API.
> parsing the first xml-document works fine, but on parsing the next
document i got an unhandled exception by the statement:
>
> SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();
>
> can anybody tell me why ??
> thx niqlas
>
>
>
> here is my code excerpt:
> ( i do this in a loop for every xml-document )
>
>
> try {
> XMLPlatformUtils::Initialize();
> }
> catch (const XMLException& toCatch)
> {
> ...
> return NULL;
> }
>
> SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();
>
parser->setFeature(XMLString::transcode("http://xml.org/sax/features/namespa
ces"), false);
>
parser->setFeature(XMLString::transcode("http://xml.org/sax/features/validat
ion"), true);
>
parser->setFeature(XMLString::transcode("http://apache.org/xml/features/vali
dation/dynamic"), true);
>
> XOBHandler handler;
> parser->setContentHandler(&handler);
> parser->setErrorHandler(&handler);
> try {
> parser->parse( XMLFILE );
> }
> catch (const XMLException& e)
> {
> ....
> XMLPlatformUtils::Terminate();
> return NULL;
> }
> catch (...)
> {
> XMLPlatformUtils::Terminate();
> return NULL;
> }
>
> XMLPlatformUtils::Terminate();
>
> ___________________________________________________________
> TopMail - Jetzt kostenlos anmelden - http://www.topmail.de
> * Wollt Ihr Super-Markenartikel zu Schnaeppchen-Preisen? *
> **** Dann seid Ihr hier genau richtig! ***
> **** Einfach anklicken und Powershoppen!!! ***
> http://www.powershopping.de/redir.jsp?app=powers&DD=1&DP=81
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]