34 #include <xercesc/sax2/XMLReaderFactory.hpp>
35 #include <xercesc/util/PlatformUtils.hpp>
41 #ifdef CHECK_MEMORY_LEAKS
43 #endif // CHECK_MEMORY_LEAKS
61 XMLPlatformUtils::Initialize();
64 }
catch (
const XMLException& e) {
72 for (std::vector<SAX2XMLReader*>::iterator i =
myReaders.begin(); i !=
myReaders.end(); ++i) {
76 XMLPlatformUtils::Terminate();
86 reader->setContentHandler(&handler);
87 reader->setErrorHandler(&handler);
101 const std::string& file) {
114 if (std::string(e.what()) != std::string(
"Process Error") && std::string(e.what()) != std::string(
"")) {
128 SAX2XMLReader* reader = XMLReaderFactory::createXMLReader();
134 reader->setProperty(XMLUni::fgXercesScannerName, (
void*)XMLUni::fgWFXMLScanner);
136 setFeature(*reader,
"http://xml.org/sax/features/namespaces",
false);
147 const std::string& feature,
bool value) {
148 XMLCh* xmlFeature = XMLString::transcode(feature.c_str());
149 reader.setFeature(xmlFeature, value);
150 XMLString::release(&xmlFeature);