1
#ifndef XMLPULLPARSER_H_
2
#define XMLPULLPARSER_H_
14
enum event { START_DOCUMENT, END_DOCUMENT, START_TAG, END_TAG, TEXT };
17
virtual ~xmlpullparser();
18
void setInput(std::istream& is);
19
int getAttributeCount() const;
20
std::string getAttributeName(unsigned int index) const;
21
std::string getAttributeValue(unsigned int index) const;
22
std::string getAttributeValue(const std::string& name) const;
23
event getEventType() const;
24
std::string getText() const;
25
bool isWhitespace() const;
29
typedef std::pair<std::string,std::string> attribute;
30
std::vector<attribute> attributes;
32
std::istream * inputstream;
35
int skip_whitespace(std::string& ws);
36
void add_attribute(std::string s);
37
std::string read_tag();
38
event determine_tag_type();
39
std::string decode_attribute(const std::string& s);
40
std::string decode_entities(const std::string& s);
41
std::string decode_entity(std::string s);
42
void remove_trailing_whitespace(std::string& s);
48
#endif /*XMLPULLPARSER_H_*/