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 |
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.
|
private |
|
explicit |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Get id
of the element/attribute.
The value is based on the tokenizer the derived class uses.
id
.
|
private |
void libebook::EBOOKXMLParser::parse | ( | ) |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
private |
Referenced by EBOOKXMLParser(), and parse().