28 #ifndef _CEGUIXercesParser_h_
29 #define _CEGUIXercesParser_h_
31 #include "../../CEGUIXMLParser.h"
32 #include "CEGUIXercesParserProperties.h"
34 #if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)
35 # ifdef CEGUIXERCESPARSER_EXPORTS
36 # define CEGUIXERCESPARSER_API __declspec(dllexport)
38 # define CEGUIXERCESPARSER_API __declspec(dllimport)
41 # define CEGUIXERCESPARSER_API
46 #include <xercesc/framework/MemBufInputSource.hpp>
47 #include <xercesc/util/PlatformUtils.hpp>
48 #include <xercesc/util/TransService.hpp>
49 #include <xercesc/util/XMLString.hpp>
50 #include <xercesc/sax2/Attributes.hpp>
51 #include <xercesc/sax2/DefaultHandler.hpp>
52 #include <xercesc/sax2/SAX2XMLReader.hpp>
53 #include <xercesc/sax2/XMLReaderFactory.hpp>
65 void startElement(
const XMLCh*
const uri,
const XMLCh*
const localname,
const XMLCh*
const qname,
const XERCES_CPP_NAMESPACE::Attributes& attrs);
66 void endElement(
const XMLCh*
const uri,
const XMLCh*
const localname,
const XMLCh*
const qname);
67 #if _XERCES_VERSION >= 30000
68 void characters(
const XMLCh*
const chars,
const XMLSize_t length);
70 void characters (
const XMLCh *
const chars,
const unsigned int length);
72 void warning (
const XERCES_CPP_NAMESPACE::SAXParseException &exc);
73 void error (
const XERCES_CPP_NAMESPACE::SAXParseException &exc);
74 void fatalError (
const XERCES_CPP_NAMESPACE::SAXParseException &exc);
98 static void populateAttributesBlock(
const XERCES_CPP_NAMESPACE::Attributes& src,
XMLAttributes& dest);
111 static String transcodeXmlCharToString(
const XMLCh*
const xmlch_str,
unsigned int length);
124 { d_defaultSchemaResourceGroup = resourceGroup; }
134 {
return d_defaultSchemaResourceGroup; }
137 static void initialiseSchema(XERCES_CPP_NAMESPACE::SAX2XMLReader* reader,
const String& schemaName,
const String& xmlFilename,
const String& resourceGroup);
138 static XERCES_CPP_NAMESPACE::SAX2XMLReader* createReader(XERCES_CPP_NAMESPACE::DefaultHandler& handler);
139 static void doParse(XERCES_CPP_NAMESPACE::SAX2XMLReader* parser,
const String& xmlFilename,
const String& resourceGroup);
142 bool initialiseImpl(
void);
143 void cleanupImpl(
void);
155 #endif // end of guard _CEGUIXercesParser_h_
static void setSchemaDefaultResourceGroup(const String &resourceGroup)
Sets the default resource group to be used when loading schema files.
Definition: CEGUIXercesParser.h:123
static String d_defaultSchemaResourceGroup
holds the default resource group ID for loading schemas.
Definition: CEGUIXercesParser.h:146
Definition: CEGUIXMLHandler.h:37
Definition: CEGUIXercesParser.h:58
XMLHandler & d_handler
This is the 'real' CEGUI based handler which we interface via.
Definition: CEGUIXercesParser.h:77
static XercesParserProperties::SchemaDefaultResourceGroup s_schemaDefaultResourceGroupProperty
Property for accessing the default schema resource group ID.
Definition: CEGUIXercesParser.h:149
static const String & getSchemaDefaultResourceGroup()
Returns the default resource group used when loading schema files.
Definition: CEGUIXercesParser.h:133
Implementation of XMLParser using Xerces-C++.
Definition: CEGUIXercesParser.h:84
Class representing a block of attributes associated with an XML element.
Definition: CEGUIXMLAttributes.h:47
Property to access the resource group used to load .xsd schema files.
Definition: CEGUIXercesParserProperties.h:48
This is an abstract class that is used by CEGUI to interface with XML parser libraries.
Definition: CEGUIXMLParser.h:42
String class used within the GUI system.
Definition: CEGUIString.h:57