From f2ec36ab5fa04e11dee655d9c623baac95db1eba Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 13 Nov 2013 07:46:45 +0200 Subject: Drop support for Xerces-C++ 2-series --- examples/cxx/tree/streaming/parser.cxx | 36 +++------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) (limited to 'examples/cxx/tree/streaming/parser.cxx') diff --git a/examples/cxx/tree/streaming/parser.cxx b/examples/cxx/tree/streaming/parser.cxx index f593a14..4696d5c 100644 --- a/examples/cxx/tree/streaming/parser.cxx +++ b/examples/cxx/tree/streaming/parser.cxx @@ -11,10 +11,7 @@ #include #include - -#if _XERCES_VERSION >= 30000 -# include -#endif +#include #include @@ -59,12 +56,7 @@ private: virtual void characters (const XMLCh* const s, -#if _XERCES_VERSION >= 30000 - const XMLSize_t length -#else - const unsigned int length -#endif - ); + const XMLSize_t length); private: // SAX parser. @@ -101,7 +93,7 @@ parser_impl () // Xerces-C++ 3.1.0 is the first version with working multi import // support. It also allows us to disable buffering in the parser - // so that the date is parsed and returned as soon as it is + // so that the data is parsed and returned as soon as it is // available. // #if _XERCES_VERSION >= 30100 @@ -214,11 +206,7 @@ startElement (const XMLCh* const uri, // Set attributes. // -#if _XERCES_VERSION >= 30000 for (XMLSize_t i (0), end (attr.getLength()); i < end; ++i) -#else - for (unsigned int i (0), end (attr.getLength()); i < end; ++i) -#endif { const XMLCh* qn (attr.getQName (i)); const XMLCh* ns (attr.getURI (i)); @@ -247,7 +235,6 @@ endElement (const XMLCh* const /*uri*/, cur_ = static_cast (cur_->getParentNode ()); } -#if _XERCES_VERSION >= 30000 void parser_impl:: characters (const XMLCh* const s, const XMLSize_t length) { @@ -262,23 +249,6 @@ characters (const XMLCh* const s, const XMLSize_t length) cur_->appendChild (t); } } -#else -void parser_impl:: -characters (const XMLCh* const s, const unsigned int length) -{ - // Ignore text content (presumably whitespaces) in the root element. - // - if (depth_ > 1) - { - // For Xerces-C++ 2-series we have to make copy. - // - xsd::cxx::auto_array tmp (new XMLCh[length + 1]); - XMLString::copyNString (tmp.get (), s, length); - cur_->appendChild (doc_->createTextNode (tmp.get ())); - } -} -#endif - // // parser -- cgit v1.1