27#ifndef _CEGUIXercesParser_h_
28#define _CEGUIXercesParser_h_
30#include "../../XMLParser.h"
31#include "CEGUI/XMLParserModules/Xerces/XMLParserProperties.h"
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);
128 { d_defaultSchemaResourceGroup = resourceGroup; }
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);
Class used as the databuffer for loading files throughout the library.
Definition DataContainer.h:44
String class used within the GUI system.
Definition String.h:64
Class representing a block of attributes associated with an XML element.
Definition XMLAttributes.h:48
Definition XMLHandler.h:37
This is an abstract class that is used by CEGUI to interface with XML parser libraries.
Definition XMLParser.h:44
Definition XMLParserModules/Xerces/XMLParser.h:63
XMLHandler & d_handler
This is the 'real' CEGUI based handler which we interface via.
Definition XMLParserModules/Xerces/XMLParser.h:81
Property to access the resource group used to load .xsd schema files.
Definition XMLParserProperties.h:48
Implementation of XMLParser using Xerces-C++.
Definition XMLParserModules/Xerces/XMLParser.h:89
static String d_defaultSchemaResourceGroup
holds the default resource group ID for loading schemas.
Definition XMLParserModules/Xerces/XMLParser.h:150
static void populateAttributesBlock(const XERCES_CPP_NAMESPACE::Attributes &src, XMLAttributes &dest)
Populate the CEGUI::XMLAttributes object with attribute data from the Xerces attributes block.
static void setSchemaDefaultResourceGroup(const String &resourceGroup)
Sets the default resource group to be used when loading schema files.
Definition XMLParserModules/Xerces/XMLParser.h:127
void cleanupImpl(void)
abstract method which cleans up the XMLParser after use.
static XercesParserProperties::SchemaDefaultResourceGroup s_schemaDefaultResourceGroupProperty
Property for accessing the default schema resource group ID.
Definition XMLParserModules/Xerces/XMLParser.h:153
bool initialiseImpl(void)
abstract method which initialises the XMLParser ready for use.
void parseXML(XMLHandler &handler, const RawDataContainer &source, const String &schemaName)
abstract method which initiates parsing of an XML.
static const String & getSchemaDefaultResourceGroup()
Returns the default resource group used when loading schema files.
Definition XMLParserModules/Xerces/XMLParser.h:137
static String transcodeXmlCharToString(const XMLCh *const xmlch_str, unsigned int length)
Return a CEGUI::String containing the Xerces XMLChar string data in xmlch_str.
Main namespace for Crazy Eddie's GUI Library.
Definition arch_overview.dox:1