#include <parse.hpp>
Inheritance diagram for ph::persist::xml::parse:
Definition at line 51 of file parse.hpp.
Public Member Functions | |
parse (std::ostream *errorhandler=NULL, bool silent=false) | |
virtual | ~parse () |
void | startparse (const std::string &streamname) |
int | doparse (char *buf, long len, int done) |
void | endparse () |
int | parsestream (std::istream *stream, const std::string &streamname) |
int | doparsefile (const std::string &filename) |
virtual void | startelement_handler (const xmlstring &name, const std::vector< xmlstring > &atts)=0 |
virtual void | endelement_handler (const xmlstring &name)=0 |
virtual void | cdata_handler (const xmlstring &s, int len) |
virtual void | comment_handler (const xmlstring &s) |
virtual void | default_handler (const xmlstring &s, int len) |
virtual void | finish_handler () |
int | error () |
Static Public Member Functions | |
static bool | parse_xml (std::istream *stream, const std::string &streampath, parse *parser, parse_progress *progress) |
static bool | decodexmldata (const xmlstring &s, xmlstring *news) |
static bool | encodexmldata (const xmlstring &s, xmlstring *news) |
Protected Member Functions | |
xmlstring | current (int top=0) |
xmlstring | element (int top) |
xmlstring | expectedattr (const std::vector< xmlstring > &atts, const xmlstring &token) |
xmlstring | attr (const std::vector< xmlstring > &atts, const xmlstring &token) |
xmlstring | attr (const std::vector< xmlstring > &atts, int index) |
xmlstring | attrval (const std::vector< xmlstring > &atts, int index) |
void | expected_error (const xmlstring &token) |
void | error (const std::string &string, bool detail=true) |
void | error (const std::string &format, const std::string &s1, bool detail=true) |
void | error (const std::string &format, const std::string &s1, const std::string &s2, bool detail=true) |
Protected Attributes | |
bool | _silent |
std::ostream * | _errorhandler |
|
|
|
|
|
Definition at line 32 of file parse.cpp. References BUFFER_SIZE, doparse(), endparse(), error(), PARSE_SUCCESS, ph::persist::xml::parse_progress::progress(), PROGRESS_UNIT, startparse(), and ph::persist::xml::parse_progress::total(). Referenced by persist_test::test_baddata::test(). |
|
Definition at line 74 of file parse.cpp. References PARSE_SUCCESS, XML_ParserCreate(), XML_SetCharacterDataHandler(), XML_SetCommentHandler(), XML_SetDefaultHandler(), XML_SetElementHandler(), and XML_SetUserData(). Referenced by parse_xml(), and parsestream(). |
|
Definition at line 92 of file parse.cpp. References PARSE_BADXMLTYPE, PARSE_SUCCESS, and XML_Parse(). Referenced by parse_xml(), and parsestream(). |
|
Definition at line 120 of file parse.cpp. References finish_handler(), and XML_ParserFree(). Referenced by parse_xml(), and parsestream(). |
|
Definition at line 130 of file parse.cpp. References BUFFER_SIZE, doparse(), endparse(), error(), PARSE_SUCCESS, and startparse(). Referenced by doparsefile(). |
|
Definition at line 153 of file parse.cpp. References PARSE_NOFILE, and parsestream(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 94 of file parse.hpp. Referenced by endparse(). |
|
Definition at line 97 of file parse.hpp. Referenced by error(), expected_error(), parse_xml(), and parsestream(). |
|
|
|
|
|
|
|
|
|
Definition at line 253 of file parse.cpp. References attr(), expected_error(), and S. |
|
Definition at line 240 of file parse.cpp. References S. Referenced by expectedattr(). |
|
Definition at line 226 of file parse.cpp. References S. |
|
Definition at line 233 of file parse.cpp. References S. |
|
Definition at line 263 of file parse.cpp. References error(), and XMLFmt_expected. Referenced by expectedattr(). |
|
Definition at line 268 of file parse.cpp. References _errorhandler, _silent, PARSE_XMLERROR, and XMLFmt_error. |
|
Definition at line 291 of file parse.cpp. References error(). |
|
Definition at line 296 of file parse.cpp. References error(). |
|
Definition at line 103 of file parse.hpp. Referenced by error(). |
|
Definition at line 104 of file parse.hpp. Referenced by error(). |