MoSync 3.3
Mtx::SaxContext Class Reference

8-bit SAX parser context wrapper class. More...

#include <MTXml/MTSax.h>

Inheritance diagram for Mtx::SaxContext:
Mtx::SaxContextBase

List of all members.

Public Member Functions

 SaxContext (void)
void start (SaxListener &newSaxListener, MtxListener &newMtxListener)
bool feed (char *data)
bool feedProcess (char *data)
void stop (void)
bool isStarted (void) const

Static Protected Member Functions

static void encoding (MTXSaxContext *context, const char *value)
static void startElement (MTXSaxContext *context, const void *name, const void **attributes)
static void endElement (MTXSaxContext *context, const void *name)
static void characters (MTXSaxContext *context, const void *data, int length)
static void dataRemains (MTXSaxContext *context, const char *data, int length)
static void parseError (MTXSaxContext *context, int offset)

Protected Attributes

MTXSaxContext mContext
MtxListenermMtxListener
SaxListenerWmSaxListenerW

Detailed Description

8-bit SAX parser context wrapper class.


Constructor & Destructor Documentation

Constructor.


Member Function Documentation

void Mtx::SaxContext::start ( SaxListener newSaxListener,
MtxListener newMtxListener 
)

Initializes this parser context using the specified callback interfaces. The SAX interface receives XML data, while the MTXml interface handles buffer management.

Parameters:
newSaxListenerThe SAX interface implementation to use.
newMtxListenerThe MTXml interface implementation to use.
See also:
mtxSaxStart
bool Mtx::SaxContext::feed ( char *  data)

Feeds some data into this parser context. The context must already be started. Any remaining data is passed to the MtxListener interface.

Parameters:
dataThe (null-terminated) data to feed into the parser.
Note:
You must not call this method from within a callback.
This function alters the content of the input buffer.
See also:
mtxSaxFeed
bool Mtx::SaxContext::feedProcess ( char *  data)

Feeds some data into this parser context, with UTF-8 to Latin-1 conversion. The context must already be started. Any remaining data is passed to the MtxListener interface.

Parameters:
dataThe (null-terminated) data to feed into the parser.
Note:
You must not call this method from within a callback.
This function alters the content of the input buffer.
See also:
mtxSaxFeedProcess
void Mtx::SaxContextBase::stop ( void  ) [inherited]

De-initializes this parser context if it was previously initialized.

See also:
mtxSaxStop
bool Mtx::SaxContextBase::isStarted ( void  ) const [inherited]
Returns:
true if this parser context is initialized, otherwise false.
static void Mtx::SaxContextBase::encoding ( MTXSaxContext context,
const char *  value 
) [static, protected, inherited]
static void Mtx::SaxContextBase::startElement ( MTXSaxContext context,
const void *  name,
const void **  attributes 
) [static, protected, inherited]
static void Mtx::SaxContextBase::endElement ( MTXSaxContext context,
const void *  name 
) [static, protected, inherited]
static void Mtx::SaxContextBase::characters ( MTXSaxContext context,
const void *  data,
int  length 
) [static, protected, inherited]
static void Mtx::SaxContextBase::dataRemains ( MTXSaxContext context,
const char *  data,
int  length 
) [static, protected, inherited]
static void Mtx::SaxContextBase::parseError ( MTXSaxContext context,
int  offset 
) [static, protected, inherited]

Member Data Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines