Re: [libxml++] questions regarding parse_chunk



Hi,


Shannon S. Harvey wrote:

Hello all,

Just a quick question regarding your api for sax parsing of network-based xml communications. I wish to use the parse_chunk method to parse chunks of data as it is received over a socket connection. However, there may be multiple xml "messages" received back-to-back. I'm a bit confused as to when to call finish_chunk_parsing when I'm relying on a separate class entity to perform my parsing (one class handles network connectivity, the other class handles the parsing of the xml "messages").
Any suggestions or comments you might have would be appreciated.


The finish_chunk_parsing has to be called at the end of the xml document.
If your connection is providing you a separated xml document for each 'message', then you need to call it after each 'message'. Theoraticaly you should be able to use the same SaxParser instance for several documents, although I did not tested that. If you do please report if it works well.

Regards

Christophe





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]