diff options
Diffstat (limited to 'server/src/saxparser.cc')
-rw-r--r-- | server/src/saxparser.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/server/src/saxparser.cc b/server/src/saxparser.cc index 2eabf38..e8e9eb4 100644 --- a/server/src/saxparser.cc +++ b/server/src/saxparser.cc @@ -26,6 +26,14 @@ */ #include "saxparser.h" +static void character_hndl(void *p, const XML_Char *s, int len) +{ + SAXParser *parser = (SAXParser*)XML_GetUserData(p); + std::string chars; + chars.append(s, len); + parser->characterData(chars); +} + static void start_hndl(void *p, const char *el, const char **attr) { SAXParser *parser = (SAXParser*)XML_GetUserData(p); @@ -66,6 +74,7 @@ SAXParser::SAXParser() XML_SetUserData(p, this); XML_UseParserAsHandlerArg(p); XML_SetElementHandler(p, start_hndl, end_hndl); + XML_SetCharacterDataHandler(p, character_hndl); } SAXParser::~SAXParser() |