libebook::EBOOKXMLParser Class Reference documentation

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Private Member Functions | Private Attributes | List of all members
libebook::EBOOKXMLParser Class Referenceabstract

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

`#include <EBOOKXMLParser.h>`

## 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. More...
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)
EBOOKXMLParser & | operator= (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

libebook::EBOOKXMLParser::EBOOKXMLParser | ( | const EBOOKXMLParser & | other | ) |
| private

libebook::EBOOKXMLParser::EBOOKXMLParser | ( | const RVNGInputStreamPtr_t & | input | ) |
| explicit

libebook::EBOOKXMLParser::~EBOOKXMLParser | ( |  | ) |
| pure virtual

## 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

void libebook::EBOOKXMLParser::parse | ( |  | ) |

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

const RVNGInputStreamPtr_t libebook::EBOOKXMLParser::m_input
| private

Referenced by EBOOKXMLParser(), and parse().

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

- EBOOKXMLParser.h
- EBOOKXMLParser.cpp