summaryrefslogtreecommitdiff
path: root/server/src/xmlparser.h
diff options
context:
space:
mode:
authordeva <deva>2008-03-26 13:04:30 +0000
committerdeva <deva>2008-03-26 13:04:30 +0000
commit6e76c4540e37280d0c161e7d7035e2e9022b18ce (patch)
tree97dffd6ddc732890c97ca41c7149cb1ac1afac6e /server/src/xmlparser.h
parentfdb7aadb054f233401a9f3dd882b79ac5ccd5191 (diff)
Implemented a SAXPaser class, and made the macro and xml parsers use it.
Diffstat (limited to 'server/src/xmlparser.h')
-rw-r--r--server/src/xmlparser.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/server/src/xmlparser.h b/server/src/xmlparser.h
index 8e6b7aa..30e6767 100644
--- a/server/src/xmlparser.h
+++ b/server/src/xmlparser.h
@@ -27,9 +27,24 @@
#ifndef __PRACRO_XMLPARSER_H__
#define __PRACRO_XMLPARSER_H__
+#include "sax_parser.h"
#include "tcpsocket.h"
#include "transaction.h"
-void parse(TCPSocket &socket, Transaction &transaction);
+class XMLParser : public SAXParser {
+public:
+ XMLParser(TCPSocket &socket, Transaction &transaction);
+
+ void startTag(std::string name, std::map< std::string, std::string> attributes);
+ void endTag(std::string name);
+
+protected:
+ int readData(char *data, size_t size);
+
+private:
+ Transaction *transaction;
+ TCPSocket *socket;
+ bool done;
+};
#endif/*__PRACRO_XMLPARSER_H__*/