summaryrefslogtreecommitdiff
path: root/src/xmlreader.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-06-28 07:28:17 +0000
committerMike Buland <eichlan@xagasoft.com>2006-06-28 07:28:17 +0000
commit789eaff64b6dcdf920eb3f5a5d64ab4f1f33aa05 (patch)
tree8eae4bb7d22e5553e130c513cc3e29347cfc28c2 /src/xmlreader.h
parent35274124dc95ec5d6094e71c18ac7b484d812f13 (diff)
downloadlibbu++-789eaff64b6dcdf920eb3f5a5d64ab4f1f33aa05.tar.gz
libbu++-789eaff64b6dcdf920eb3f5a5d64ab4f1f33aa05.tar.bz2
libbu++-789eaff64b6dcdf920eb3f5a5d64ab4f1f33aa05.tar.xz
libbu++-789eaff64b6dcdf920eb3f5a5d64ab4f1f33aa05.zip
Entities now work in the xml processor the way they should, you can define your
own, use the 5 builtin ones (gt, lt, apos, quot, amp), and even create your own. The parser now skips any text definition at the top, which is fine for most xml that you get these days. I think if we ever make the break to full compliance we'll need to make a new parser from scratch.
Diffstat (limited to '')
-rw-r--r--src/xmlreader.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/xmlreader.h b/src/xmlreader.h
index 4117dfd..a9881cb 100644
--- a/src/xmlreader.h
+++ b/src/xmlreader.h
@@ -4,6 +4,8 @@
4#include <stdio.h> 4#include <stdio.h>
5#include "xmldocument.h" 5#include "xmldocument.h"
6#include "flexbuf.h" 6#include "flexbuf.h"
7#include "hashtable.h"
8#include "staticstring.h"
7 9
8/** 10/**
9 * Takes care of reading in xml formatted data from a file. This could/should 11 * Takes care of reading in xml formatted data from a file. This could/should
@@ -90,7 +92,25 @@ private:
90 */ 92 */
91 bool name(); 93 bool name();
92 94
93 char getEscape(); 95 /**
96 * Automoton function: textDecl. Processes the xml text decleration, if
97 * there is one.
98 */
99 void textDecl();
100
101 /**
102 * Automoton function: entity. Processes an entity from the header.
103 */
104 void entity();
105
106 /**
107 * Adds an entity to the list, if it doesn't already exist.
108 *@param name The name of the entity
109 *@param value The value of the entity
110 */
111 void addEntity( const char *name, const char *value );
112
113 StaticString *getEscape();
94 114
95 /** 115 /**
96 * Automoton function: paramlist. Processes a list of node params. 116 * Automoton function: paramlist. Processes a list of node params.
@@ -114,6 +134,8 @@ private:
114 FlexBuf fbParamName; /**< buffer for the current param's name. */ 134 FlexBuf fbParamName; /**< buffer for the current param's name. */
115 FlexBuf fbParamValue; /**< buffer for the current param's value. */ 135 FlexBuf fbParamValue; /**< buffer for the current param's value. */
116 bool bStrip; /**< Are we stripping whitespace? */ 136 bool bStrip; /**< Are we stripping whitespace? */
137
138 HashTable htEntity; /**< Entity type definitions. */
117}; 139};
118 140
119#endif 141#endif