diff options
author | deva <deva> | 2008-05-16 15:00:12 +0000 |
---|---|---|
committer | deva <deva> | 2008-05-16 15:00:12 +0000 |
commit | d22c5966c130ef7768bac7914cb4dafa74088036 (patch) | |
tree | 9e0cffb41f582cdf01f592257dd6c85677241f2e /server/src/saxparser.cc | |
parent | 3f2a5d6e373a79260594382c67d693d4b97c4ffa (diff) |
Worked on the connection of the various elements of the server.
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() |