From d22c5966c130ef7768bac7914cb4dafa74088036 Mon Sep 17 00:00:00 2001 From: deva Date: Fri, 16 May 2008 15:00:12 +0000 Subject: Worked on the connection of the various elements of the server. --- server/src/saxparser.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'server/src/saxparser.cc') 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() -- cgit v1.2.3