27 #ifndef _CEGUIXercesParser_h_
28 #define _CEGUIXercesParser_h_
30 #include "../../XMLParser.h"
31 #include "CEGUI/XMLParserModules/Xerces/XMLParserProperties.h"
34 # pragma warning(push)
35 # pragma warning(disable : 4251)
38 #if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)
39 # ifdef CEGUIXERCESPARSER_EXPORTS
40 # define CEGUIXERCESPARSER_API __declspec(dllexport)
42 # define CEGUIXERCESPARSER_API __declspec(dllimport)
45 # define CEGUIXERCESPARSER_API
50 #include <xercesc/framework/MemBufInputSource.hpp>
51 #include <xercesc/util/PlatformUtils.hpp>
52 #include <xercesc/util/TransService.hpp>
53 #include <xercesc/util/XMLString.hpp>
54 #include <xercesc/sax2/Attributes.hpp>
55 #include <xercesc/sax2/DefaultHandler.hpp>
56 #include <xercesc/sax2/SAX2XMLReader.hpp>
57 #include <xercesc/sax2/XMLReaderFactory.hpp>
69 void startElement(
const XMLCh*
const uri,
const XMLCh*
const localname,
const XMLCh*
const qname,
const XERCES_CPP_NAMESPACE::Attributes& attrs);
70 void endElement(
const XMLCh*
const uri,
const XMLCh*
const localname,
const XMLCh*
const qname);
71 #if _XERCES_VERSION >= 30000
72 void characters(
const XMLCh*
const chars,
const XMLSize_t length);
74 void characters (
const XMLCh *
const chars,
const unsigned int length);
76 void warning (
const XERCES_CPP_NAMESPACE::SAXParseException &exc);
77 void error (
const XERCES_CPP_NAMESPACE::SAXParseException &exc);
78 void fatalError (
const XERCES_CPP_NAMESPACE::SAXParseException &exc);
102 static void populateAttributesBlock(
const XERCES_CPP_NAMESPACE::Attributes& src,
XMLAttributes& dest);
115 static String transcodeXmlCharToString(
const XMLCh*
const xmlch_str,
unsigned int length);
127 static void setSchemaDefaultResourceGroup(
const String& resourceGroup)
128 { d_defaultSchemaResourceGroup = resourceGroup; }
137 static const String& getSchemaDefaultResourceGroup()
138 {
return d_defaultSchemaResourceGroup; }
141 static void initialiseSchema(XERCES_CPP_NAMESPACE::SAX2XMLReader* reader,
const String& schemaName);
142 static XERCES_CPP_NAMESPACE::SAX2XMLReader* createReader(XERCES_CPP_NAMESPACE::DefaultHandler& handler);
143 static void doParse(XERCES_CPP_NAMESPACE::SAX2XMLReader* parser,
const RawDataContainer& source);
146 bool initialiseImpl(
void);
147 void cleanupImpl(
void);
158 #if defined(_MSC_VER)
159 # pragma warning(pop)
162 #endif // end of guard _CEGUIXercesParser_h_