00001 #ifndef ots_DOMTreeErrorReporter_h 00002 #define ots_DOMTreeErrorReporter_h 00003 00004 #include <xercesc/sax/ErrorHandler.hpp> 00005 #include <xercesc/sax/SAXParseException.hpp> 00006 #include <string> 00007 00008 namespace ots 00009 { 00010 00011 class DOMTreeErrorReporter : public xercesc::ErrorHandler 00012 { 00013 public: 00014 DOMTreeErrorReporter(); 00015 ~DOMTreeErrorReporter(); 00016 00017 void warning (const xercesc::SAXParseException& exception); 00018 void error (const xercesc::SAXParseException& exception); 00019 void fatalError (const xercesc::SAXParseException& exception); 00020 void resetErrors(void); 00021 private: 00022 std::string reportParseException(const xercesc::SAXParseException& exception); 00023 00024 }; 00025 00026 } 00027 #endif