libgexf  0.1.3
schemavalidator.h
1 /*
2  * File: schemavalidator.h
3  * Author: sebastien
4  *
5  * Created on 31 juillet 2009, 01:19
6  */
7 
8 #ifndef _SCHEMAVALIDATOR_H
9 #define _SCHEMAVALIDATOR_H
10 
11 #include <libxml/xmlreader.h>
12 #include <libxml/xmlschemas.h>
13 #include <string>
14 
15 namespace libgexf {
16 
21 public:
23 
27  SchemaValidator(const SchemaValidator& orig);
28 
29  virtual ~SchemaValidator();
30 
39  static bool run(const std::string& xml_file_pathname, const std::string& xml_schema_file_pathname);
40 private:
41  static void schemaErrorCallback(void*, const char* const msg, xmlParserSeverities severity, xmlTextReaderLocatorPtr locator);
42  static void schemaWarningCallback(void* callbackData, const char* const msg, xmlParserSeverities severity, xmlTextReaderLocatorPtr locator);
43  virtual void iAmAbstract() = 0;
44 };
45 
46 } /* namespace libgexf */
47 
48 #endif /* _SCHEMAVALIDATOR_H */
49 
Definition: abstractiter.h:32
XML Schema validator.
Definition: schemavalidator.h:20
static bool run(const std::string &xml_file_pathname, const std::string &xml_schema_file_pathname)
Validate an XML file based on an XML Schema.
Definition: schemavalidator.cpp:40