libebook::EBOOKXMLParser Class Reference

Base class for simple SAX-like XML parser. More...

#include <EBOOKXMLParser.h>

List of all members.

Public Member Functions

 EBOOKXMLParser (const RVNGInputStreamPtr_t &input)
virtual ~EBOOKXMLParser ()=0
void parse ()
virtual int getId (const char *name, const char *ns) const =0
 Get id of the element/attribute.
virtual void startElement (int id)=0
virtual void endElement (int id)=0
virtual void attribute (int id, const char *value)=0
virtual void startElementByName (const char *name, const char *ns)=0
virtual void endElementByName (const char *name, const char *ns)=0
virtual void attributeByName (const char *name, const char *ns, const char *value)=0
virtual void text (const char *value)=0

Private Member Functions

 EBOOKXMLParser (const EBOOKXMLParser &other)
EBOOKXMLParseroperator= (const EBOOKXMLParser &other)

Private Attributes

const RVNGInputStreamPtr_t m_input

Detailed Description

Base class for simple SAX-like XML parser.

There are two interfaces a derived class can use: the first one expects that the derived class uses a tokenizer and therefore passes token IDs to the callbacks (this is preferred). The other one uses strings (which can of course be used in combination with token IDs, if the XML format does allow foreign elements or attributes).

Calls of startElement / endElement (or startElementByName / endElementByName) are always paired. That means that endElement (or endElementByName) is emitted even for empty elements.


Constructor & Destructor Documentation


Member Function Documentation

virtual void libebook::EBOOKXMLParser::attribute ( int  id,
const char *  value 
) [pure virtual]
virtual void libebook::EBOOKXMLParser::attributeByName ( const char *  name,
const char *  ns,
const char *  value 
) [pure virtual]
virtual void libebook::EBOOKXMLParser::endElement ( int  id) [pure virtual]
virtual void libebook::EBOOKXMLParser::endElementByName ( const char *  name,
const char *  ns 
) [pure virtual]
virtual int libebook::EBOOKXMLParser::getId ( const char *  name,
const char *  ns 
) const [pure virtual]

Get id of the element/attribute.

The value is based on the tokenizer the derived class uses.

Returns:
the id.
EBOOKXMLParser& libebook::EBOOKXMLParser::operator= ( const EBOOKXMLParser other) [private]
virtual void libebook::EBOOKXMLParser::startElement ( int  id) [pure virtual]
virtual void libebook::EBOOKXMLParser::startElementByName ( const char *  name,
const char *  ns 
) [pure virtual]
virtual void libebook::EBOOKXMLParser::text ( const char *  value) [pure virtual]

Member Data Documentation


The documentation for this class was generated from the following files: