Here is an idea for you. Setup the parser in a separate worker thread (WT). Set WT to parse a document from your own implemented input stream. In the YourInputStream::ReadBytes method let WT wait for data from the main thread. The setup will then simulate a progressive parse. Each time the main thread feeds WT with a datablock the WT parses it and then waits for next datablock if more data is needed. I think the method works best with SAX because then the datablock get processed immediatly and you will not have to wait until all datablocks have been processed before you can handle the document data. When you want to terminate the parse before it is finished send a special command to WT which throws an exception witch terminates the parse.
Regards Erik Rydgren Mandarinen systems AB Sweden -----Original Message----- From: Coursimault, Jean-marc [mailto:[EMAIL PROTECTED]] Sent: den 4 december 2001 11:24 To: '[EMAIL PROTECTED]' Subject: Incremental /progressive parsing Hello, My application can only provide a buffer at a time to Xerces, not a whole file neither a buffer containing the whole document. How can I feed Xerces that way (as in expat, XML_parse() does ?) ==>expat : ==>XML_Parse(XML_Parser p,const char *s,int len, int isFinal) ==>Parse some more of the document. ==>The string s is a buffer containing part (or perhaps all) of the document. I don't see anyhting suitable in tha API doc Thanks -- Jean-Marc ____________________________________________________________ Jean-Marc Coursimault | Xerox Research Centre Europe | Tel +33 (0)4 76 61 51 82 Advanced Technology & Systems | Mob. +33 (0)6 12 39 65 12 6, chemin de Maupertuis | Fax +33 (0)4 76 61 51 99 38240 Meylan (France) | mail : [EMAIL PROTECTED] --------------------------------------------------------------------- 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]