28 #ifndef _CEGUIXercesParser_h_
29 #define _CEGUIXercesParser_h_
31 #include "../../XMLParser.h"
32 #include "CEGUI/XMLParserModules/Xerces/XMLParserProperties.h"
35 # pragma warning(push)
36 # pragma warning(disable : 4251)
39 #if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)
40 # ifdef CEGUIXERCESPARSER_EXPORTS
41 # define CEGUIXERCESPARSER_API __declspec(dllexport)
43 # define CEGUIXERCESPARSER_API __declspec(dllimport)
46 # define CEGUIXERCESPARSER_API
51 #include <xercesc/framework/MemBufInputSource.hpp>
52 #include <xercesc/util/PlatformUtils.hpp>
53 #include <xercesc/util/TransService.hpp>
54 #include <xercesc/util/XMLString.hpp>
55 #include <xercesc/sax2/Attributes.hpp>
56 #include <xercesc/sax2/DefaultHandler.hpp>
57 #include <xercesc/sax2/SAX2XMLReader.hpp>
58 #include <xercesc/sax2/XMLReaderFactory.hpp>
70 void startElement(
const XMLCh*
const uri,
const XMLCh*
const localname,
const XMLCh*
const qname,
const XERCES_CPP_NAMESPACE::Attributes& attrs);
71 void endElement(
const XMLCh*
const uri,
const XMLCh*
const localname,
const XMLCh*
const qname);
72 #if _XERCES_VERSION >= 30000
73 void characters(
const XMLCh*
const chars,
const XMLSize_t length);
75 void characters (
const XMLCh *
const chars,
const unsigned int length);
77 void warning (
const XERCES_CPP_NAMESPACE::SAXParseException &exc);
78 void error (
const XERCES_CPP_NAMESPACE::SAXParseException &exc);
79 void fatalError (
const XERCES_CPP_NAMESPACE::SAXParseException &exc);
103 static void populateAttributesBlock(
const XERCES_CPP_NAMESPACE::Attributes& src,
XMLAttributes& dest);
116 static String transcodeXmlCharToString(
const XMLCh*
const xmlch_str,
unsigned int length);
128 static void setSchemaDefaultResourceGroup(
const String& resourceGroup)
129 { d_defaultSchemaResourceGroup = resourceGroup; }
138 static const String& getSchemaDefaultResourceGroup()
139 {
return d_defaultSchemaResourceGroup; }
142 static void initialiseSchema(XERCES_CPP_NAMESPACE::SAX2XMLReader* reader,
const String& schemaName);
143 static XERCES_CPP_NAMESPACE::SAX2XMLReader* createReader(XERCES_CPP_NAMESPACE::DefaultHandler& handler);
144 static void doParse(XERCES_CPP_NAMESPACE::SAX2XMLReader* parser,
const RawDataContainer& source);
147 bool initialiseImpl(
void);
148 void cleanupImpl(
void);
159 #if defined(_MSC_VER)
160 # pragma warning(pop)
163 #endif // end of guard _CEGUIXercesParser_h_