From 6f69b7c48e2e005bf108b849d4fbe6e47c33bad0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 5 Nov 2009 15:48:12 +0200 Subject: Disable buffering in Xerces-C++ parser for the streaming example --- examples/cxx/tree/streaming/parser.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/cxx/tree/streaming/parser.cxx b/examples/cxx/tree/streaming/parser.cxx index 77fc6cc..5588f7a 100644 --- a/examples/cxx/tree/streaming/parser.cxx +++ b/examples/cxx/tree/streaming/parser.cxx @@ -100,10 +100,15 @@ parser_impl () parser_->setFeature (XMLUni::fgXercesSchemaFullChecking, false); // Xerces-C++ 3.1.0 is the first version with working multi import - // support. + // support. It also allows us to disable buffering in the parser + // so that the date is parsed and returned as soon as it is + // available. // #if _XERCES_VERSION >= 30100 parser_->setFeature (XMLUni::fgXercesHandleMultipleImports, true); + + XMLSize_t lwm = 0; + parser_->setProperty (XMLUni::fgXercesLowWaterMark, &lwm); #endif parser_->setErrorHandler (&error_proxy_); -- cgit v1.1