Dear Tinny

Thanks again for your valuable time and help...

This is the code:

// path: the path and the file name
void function(char *path)
{

        // Parse the license with XML4C
        XMLPlatformUtils::Initialize();
        DOMParser parser;
        parser.parse(path);

        doc = parser.getDocument();
        root = doc.getDocumentElement();

        ... ...

        parser.reset();
        XMLPlatformUtils::Terminate();
}

Still the problem happens. I have checked, the problem happens at the
DOMParser parser;
Please help. Thanks.


Best regards,
--------------------------------------------
Jordan Cheun Ngen, Chong
Room 4067
Distributed and Embeded Systems Group
Centre for Telematics and Information Technology
University of Twente
Faculty Informatica
7522 NB Enschede
The Netherlands
--------------------------------------------
Office Phone: +31 53 4894655
Web site: http://www.cs.utwente.nl/~chong
Email Add.: [EMAIL PROTECTED]
============================================


> -----Original Message-----
> From: Tinny Ng [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 20, 2001 3:09 PM
> To: [EMAIL PROTECTED]
> Subject: Re: xerces c++ parser does not parse new xml after reset
>
>
>
>
> Elliott Perkins wrote:
>
> > [snipped] The question
> > is "how do you use DOMParser to parse multiple XMLs within the same
> > session"?  Other than the call to XMLPlatformUtils::Initialize(), are
> > there other initialization calls that are required in order to setup the
> > DOMParser?
>
> You cannot call XMLPlatformUtils::Initialize(); again after
> XMLPlatformUtils::Terminate(); within the same
> process.  See http://xml.apache.org/xerces-c/faq-parse.html#faq-25 for
> further detail.
>
> To parse multiple XMLs using the same parser, just loop the parse method
> like:
>
> for (i=0, i<numOfFiles; i++) {
>    parser.parse(xmlFile[i]);
> }
>
> You can optionally call DOMParser::reset() to reset the parser state as
> documented, although, the scanner will also call this method internally to
> reset the states.
>
> But please remember, don't call
> XMLPlatformUtils::Initialize/Terminate pair
> multiple times.
>
> Tinny.
>
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to