aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-11-05 15:48:12 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-11-05 15:48:12 +0200
commit6f69b7c48e2e005bf108b849d4fbe6e47c33bad0 (patch)
treef5df4a67872f0b12730482e1a6940bfd9cad4e81 /examples
parent8965bbe98b08b47370ea8ecca830707745ae383b (diff)
Disable buffering in Xerces-C++ parser for the streaming example
Diffstat (limited to 'examples')
-rw-r--r--examples/cxx/tree/streaming/parser.cxx7
1 files changed, 6 insertions, 1 deletions
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_);