#ifndef WRAP_XERCES #define WRAP_XERCES #define XERCES_TMPLSINC #include #include #include #include using namespace xercesc; class WrapXerces { public: WrapXerces(); ~WrapXerces(); bool validate ( const std::string& fileName ); std::string getLastError(); std::pair getErrorPosition(); private: std::string lastError; std::pair errorPosition; }; class MySAX2Handler : public DefaultHandler { public: void error ( const SAXParseException& e ) { throw e; } void warning ( const SAXParseException& e ) { throw e; } }; #endif