From bada6666c70977a058755ccf232e7d67b24adeed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 23 Jul 2014 15:21:29 +0200 Subject: New upstream release --- xsd/examples/cxx/tree/embedded/driver.cxx | 41 +------------------------------ 1 file changed, 1 insertion(+), 40 deletions(-) (limited to 'xsd/examples/cxx/tree/embedded/driver.cxx') diff --git a/xsd/examples/cxx/tree/embedded/driver.cxx b/xsd/examples/cxx/tree/embedded/driver.cxx index 6e31d3b..5ceafa4 100644 --- a/xsd/examples/cxx/tree/embedded/driver.cxx +++ b/xsd/examples/cxx/tree/embedded/driver.cxx @@ -1,5 +1,4 @@ // file : examples/cxx/tree/embedded/driver.cxx -// author : Boris Kolpackov // copyright : not copyrighted - public domain #include // std::auto_ptr @@ -12,11 +11,7 @@ #include // xercesc::Grammar #include -#if _XERCES_VERSION >= 30000 -# include -#else -# include -#endif +#include #include #include @@ -86,10 +81,6 @@ main (int argc, char* argv[]) DOMImplementation* impl ( DOMImplementationRegistry::getDOMImplementation (ls_id)); -#if _XERCES_VERSION >= 30000 - - // Xerces-C++ 3.0.0 and later. - // xml::dom::auto_ptr parser ( impl->createLSParser ( DOMImplementationLS::MODE_SYNCHRONOUS, 0, mm, gp.get ())); @@ -150,32 +141,6 @@ main (int argc, char* argv[]) xml::dom::bits::error_handler_proxy ehp (eh); conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp); -#else // _XERCES_VERSION >= 30000 - - // Same as above but for Xerces-C++ 2 series. - // - xml::dom::auto_ptr parser ( - impl->createDOMBuilder( - DOMImplementationLS::MODE_SYNCHRONOUS, 0, mm, gp.get ())); - - - parser->setFeature (XMLUni::fgDOMComments, false); - parser->setFeature (XMLUni::fgDOMDatatypeNormalization, true); - parser->setFeature (XMLUni::fgDOMEntities, false); - parser->setFeature (XMLUni::fgDOMNamespaces, true); - parser->setFeature (XMLUni::fgDOMWhitespaceInElementContent, false); - parser->setFeature (XMLUni::fgDOMValidation, true); - parser->setFeature (XMLUni::fgXercesSchema, true); - parser->setFeature (XMLUni::fgXercesSchemaFullChecking, false); - parser->setFeature (XMLUni::fgXercesUseCachedGrammarInParse, true); - parser->setFeature (XMLUni::fgXercesUserAdoptsDOMDocument, true); - - tree::error_handler eh; - xml::dom::bits::error_handler_proxy ehp (eh); - parser->setErrorHandler (&ehp); - -#endif // _XERCES_VERSION >= 30000 - // Parse XML documents. // for (unsigned long i (0); i < 10; ++i) @@ -191,11 +156,7 @@ main (int argc, char* argv[]) // Parse XML to DOM. // -#if _XERCES_VERSION >= 30000 xml_schema::dom::auto_ptr doc (parser->parse (&wrap)); -#else - xml_schema::dom::auto_ptr doc (parser->parse (wrap)); -#endif eh.throw_if_failed (); -- cgit v1.2.3