ExpatParser Class Reference

C++ wrapper around the Expat parser library. More...

Collaboration diagram for ExpatParser:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ExpatParser (ExpatEvtHandler *pHandler)
 ~ExpatParser ()
bool Create (const XML_Char *encoding=NULL, const XML_Char *sep=NULL)
void Destroy (void)
bool Parse (const char *buf, size_t len, bool isFinal=true)
bool Parse (const char *buf, bool isFinal=true)
bool Parse (size_t len, bool isFinal=true)
void * GetBuffer (size_t len)
void EnableStartElementHandler (bool enable=true)
void EnableEndElementHandler (bool enable=true)
void EnableElementHandler (bool enable=true)
void EnableCharacterDataHandler (bool enable=true)
void EnableProcessingInstructionHandler (bool enable=true)
void EnableCommentHandler (bool enable=true)
void EnableStartCdataSectionHandler (bool enable=true)
void EnableEndCdataSectionHandler (bool enable=true)
void EnableCdataSectionHandler (bool enable=true)
void EnableDefaultHandler (bool enable=true, bool expand=true)
void EnableUnknownEncodingHandler (bool enable=true)
void EnableStartNamespaceDeclHandler (bool enable=true)
void EnableEndNamespaceDeclHandler (bool enable=true)
void EnableNamespaceDeclHandler (bool enable=true)
void EnableXmlDeclHandler (bool enable=true)
void EnableStartDoctypeDeclHandler (bool enable=true)
void EnableEndDoctypeDeclHandler (bool enable=true)
void EnableDoctypeDeclHandler (bool enable=true)
enum XML_Error GetErrorCode (void)
long GetCurrentByteIndex (void)
int GetCurrentLineNumber (void)
int GetCurrentColumnNumber (void)
int GetCurrentByteCount (void)
const char * GetInputContext (int32 *pOffset, int32 *pSize)
const XML_LChar * GetErrorString ()

Static Public Member Functions

static const XML_LChar * GetExpatVersion (void)
static const XML_LChar * GetErrorString (enum XML_Error err)

Private Attributes

XML_Parser m_parser
ExpatEvtHandlerm_pHandler

Detailed Description

C++ wrapper around the Expat parser library.

Date:
2004
Version:
Revision
1.2


Constructor & Destructor Documentation

ExpatParser::ExpatParser ( ExpatEvtHandler pHandler  ) 

ExpatParser::~ExpatParser (  ) 


Member Function Documentation

bool ExpatParser::Create ( const XML_Char *  encoding = NULL,
const XML_Char *  sep = NULL 
)

Create a new parser.

void ExpatParser::Destroy ( void   ) 

Destroy the current parser, if any.

bool ExpatParser::Parse ( const char *  buf,
size_t  len,
bool  isFinal = true 
)

Parse the data pointed to by buf.

bool ExpatParser::Parse ( const char *  buf,
bool  isFinal = true 
)

bool ExpatParser::Parse ( size_t  len,
bool  isFinal = true 
)

Parse internal buffer.

void * ExpatParser::GetBuffer ( size_t  len  ) 

Get the internal buffer.

void ExpatParser::EnableStartElementHandler ( bool  enable = true  ) 

Enable/Disable the start element handler.

void ExpatParser::EnableEndElementHandler ( bool  enable = true  ) 

Enable/Disable the end element handler.

void ExpatParser::EnableElementHandler ( bool  enable = true  ) 

Enable/Disable the element handlers.

void ExpatParser::EnableCharacterDataHandler ( bool  enable = true  ) 

Enable/Disable the character data handler.

void ExpatParser::EnableProcessingInstructionHandler ( bool  enable = true  ) 

Enable/Disable the processing instruction handler.

void ExpatParser::EnableCommentHandler ( bool  enable = true  ) 

Enable/Disable the comment handler.

void ExpatParser::EnableStartCdataSectionHandler ( bool  enable = true  ) 

Enable/Disable the start CDATA section handler

void ExpatParser::EnableEndCdataSectionHandler ( bool  enable = true  ) 

Enable/Disable the end CDATA section handler.

void ExpatParser::EnableCdataSectionHandler ( bool  enable = true  ) 

Enable/Disable the CDATA section handlers.

void ExpatParser::EnableDefaultHandler ( bool  enable = true,
bool  expand = true 
)

Enable/Disable default handler.

void ExpatParser::EnableUnknownEncodingHandler ( bool  enable = true  ) 

Enable/Disable unknown encoding handler.

void ExpatParser::EnableStartNamespaceDeclHandler ( bool  enable = true  ) 

Enable/Disable start namespace handler.

void ExpatParser::EnableEndNamespaceDeclHandler ( bool  enable = true  ) 

Enable/Disable end namespace handler.

void ExpatParser::EnableNamespaceDeclHandler ( bool  enable = true  ) 

Enable/Disable namespace handlers.

void ExpatParser::EnableXmlDeclHandler ( bool  enable = true  ) 

Enable/Disable the XML declaration handler.

void ExpatParser::EnableStartDoctypeDeclHandler ( bool  enable = true  ) 

Enable/Disable the start DOCTYPE declaration handler.

void ExpatParser::EnableEndDoctypeDeclHandler ( bool  enable = true  ) 

Enable/Disable the end DOCTYPE declaration handler.

void ExpatParser::EnableDoctypeDeclHandler ( bool  enable = true  ) 

Enable/Disable the DOCTYPE declaration handler.

enum XML_Error ExpatParser::GetErrorCode ( void   ) 

long ExpatParser::GetCurrentByteIndex ( void   ) 

int ExpatParser::GetCurrentLineNumber ( void   ) 

int ExpatParser::GetCurrentColumnNumber ( void   ) 

int ExpatParser::GetCurrentByteCount ( void   ) 

const char * ExpatParser::GetInputContext ( int32 *  pOffset,
int32 *  pSize 
)

const XML_LChar * ExpatParser::GetErrorString (  ) 

const XML_LChar * ExpatParser::GetExpatVersion ( void   )  [static]

const XML_LChar * ExpatParser::GetErrorString ( enum XML_Error  err  )  [static]


Member Data Documentation

XML_Parser ExpatParser::m_parser [private]

ExpatEvtHandler* ExpatParser::m_pHandler [private]


The documentation for this class was generated from the following files:
Generated on Tue Nov 17 18:43:11 2009 for MXADataModel by  doxygen 1.5.2