From 8286ac511144e4f17d34eac9affb97e50646344a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 23 Jul 2014 15:25:44 +0200 Subject: Imported Upstream version 4.0.0 --- xsd/examples/cxx/tree/xpath/dom-parse.cxx | 32 ------------------------------- 1 file changed, 32 deletions(-) (limited to 'xsd/examples/cxx/tree/xpath/dom-parse.cxx') diff --git a/xsd/examples/cxx/tree/xpath/dom-parse.cxx b/xsd/examples/cxx/tree/xpath/dom-parse.cxx index 82e87b6..0282780 100644 --- a/xsd/examples/cxx/tree/xpath/dom-parse.cxx +++ b/xsd/examples/cxx/tree/xpath/dom-parse.cxx @@ -1,5 +1,4 @@ // file : examples/cxx/tree/xpath/dom-parse.cxx -// author : Boris Kolpackov // copyright : not copyrighted - public domain #include "dom-parse.hxx" @@ -25,10 +24,6 @@ parse (std::istream& is, bool validate, DOMImplementation* impl) { -#if _XERCES_VERSION >= 30000 - - // Xerces-C++ 3.0.0 and later. - // xml::dom::auto_ptr parser ( impl->createLSParser (DOMImplementationLS::MODE_SYNCHRONOUS, 0)); @@ -80,39 +75,12 @@ parse (std::istream& is, 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)); - - 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, validate); - parser->setFeature (XMLUni::fgXercesSchema, validate); - parser->setFeature (XMLUni::fgXercesSchemaFullChecking, false); - parser->setFeature (XMLUni::fgXercesUserAdoptsDOMDocument, true); - - tree::error_handler eh; - xml::dom::bits::error_handler_proxy ehp (eh); - parser->setErrorHandler (&ehp); - -#endif // _XERCES_VERSION >= 30000 - // Prepare input stream. // xml::sax::std_input_source isrc (is, id); Wrapper4InputSource wrap (&isrc, false); -#if _XERCES_VERSION >= 30000 xml::dom::auto_ptr doc (parser->parse (&wrap)); -#else - xml::dom::auto_ptr doc (parser->parse (wrap)); -#endif eh.throw_if_failed > (); -- cgit v1.2.3