EBOOKXMLParser.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3  * This file is part of the libe-book project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  */
9 
10 #ifndef EBOOKXMLPARSER_H_INCLUDED
11 #define EBOOKXMLPARSER_H_INCLUDED
12 
13 #include "libebook_utils.h"
14 
15 namespace libebook
16 {
17 
31 {
32  // disable copying
33  EBOOKXMLParser(const EBOOKXMLParser &other);
35 
36 public:
37  explicit EBOOKXMLParser(const RVNGInputStreamPtr_t &input);
38  virtual ~EBOOKXMLParser() = 0;
39 
40  void parse();
41 
48  virtual int getId(const char *name, const char *ns) const = 0;
49 
50  virtual void startElement(int id) = 0;
51  virtual void endElement(int id) = 0;
52  virtual void attribute(int id, const char *value) = 0;
53 
54  virtual void startElementByName(const char *name, const char *ns) = 0;
55  virtual void endElementByName(const char *name, const char *ns) = 0;
56  virtual void attributeByName(const char *name, const char *ns, const char *value) = 0;
57 
58  virtual void text(const char *value) = 0;
59 
60 private:
62 };
63 
64 }
65 
66 #endif // EBOOKXMLPARSER_H_INCLUDED
67 
68 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition: EBOOKHTMLToken.h:263
Definition: EBOOKHTMLToken.h:91
const RVNGInputStreamPtr_t m_input
Definition: EBOOKXMLParser.h:61
boost::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition: libebook_utils.h:82
virtual void endElementByName(const char *name, const char *ns)=0
EBOOKXMLParser & operator=(const EBOOKXMLParser &other)
void parse()
Definition: EBOOKXMLParser.cpp:118
virtual int getId(const char *name, const char *ns) const =0
Get id of the element/attribute.
virtual void endElement(int id)=0
virtual void attributeByName(const char *name, const char *ns, const char *value)=0
EBOOKXMLParser(const EBOOKXMLParser &other)
virtual void startElement(int id)=0
string name
Definition: CHMStream.cpp:80
virtual void text(const char *value)=0
virtual void startElementByName(const char *name, const char *ns)=0
virtual void attribute(int id, const char *value)=0
Definition: CHMParser.cpp:20
virtual ~EBOOKXMLParser()=0
Definition: EBOOKXMLParser.cpp:114
Base class for simple SAX-like XML parser.
Definition: EBOOKXMLParser.h:30

Generated for libe-book by doxygen 1.8.8