aboutsummaryrefslogtreecommitdiff
path: root/src/xmlreader.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmlreader.h')
-rw-r--r--src/xmlreader.h31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/xmlreader.h b/src/xmlreader.h
index c8f7202..7c85ddb 100644
--- a/src/xmlreader.h
+++ b/src/xmlreader.h
@@ -2,10 +2,10 @@
2#define XMLREADER 2#define XMLREADER
3 3
4#include <stdio.h> 4#include <stdio.h>
5#include "xmldocument.h" 5#include "bu/xmldocument.h"
6#include "flexbuf.h" 6#include "bu/hash.h"
7#include "hashtable.h" 7#include "bu/fstring.h"
8#include "staticstring.h" 8#include "bu/stream.h"
9 9
10/** 10/**
11 * 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
@@ -32,7 +32,7 @@ public:
32 * in content, a-la html. 32 * in content, a-la html.
33 *@param bStrip Strip out leading and trailing whitespace? 33 *@param bStrip Strip out leading and trailing whitespace?
34 */ 34 */
35 XmlReader( bool bStrip=false ); 35 XmlReader( Bu::Stream &sIn, bool bStrip=false );
36 36
37 /** 37 /**
38 * Destroy this XmlReader. 38 * Destroy this XmlReader.
@@ -54,12 +54,12 @@ private:
54 *@returns A single character at the requested position, or 0 for end of 54 *@returns A single character at the requested position, or 0 for end of
55 * stream. 55 * stream.
56 */ 56 */
57 virtual char getChar( int nIndex = 0 ) = 0; 57 virtual char getChar( int nIndex = 0 );
58 58
59 /** 59 /**
60 * Called to increment the current stream position by a single character. 60 * Called to increment the current stream position by a single character.
61 */ 61 */
62 virtual void usedChar( int nAmnt = 1) = 0; 62 virtual void usedChar( int nAmnt = 1 );
63 63
64 /** 64 /**
65 * Automoton function: is whitespace. 65 * Automoton function: is whitespace.
@@ -108,9 +108,9 @@ private:
108 *@param name The name of the entity 108 *@param name The name of the entity
109 *@param value The value of the entity 109 *@param value The value of the entity
110 */ 110 */
111 void addEntity( const char *name, const char *value ); 111 void addEntity( const Bu::FString &name, const Bu::FString &value );
112 112
113 StaticString *getEscape(); 113 Bu::FString getEscape();
114 114
115 /** 115 /**
116 * Automoton function: paramlist. Processes a list of node params. 116 * Automoton function: paramlist. Processes a list of node params.
@@ -130,12 +130,15 @@ private:
130 */ 130 */
131 bool content(); 131 bool content();
132 132
133 FlexBuf fbContent; /**< buffer for the current node's content. */ 133 Bu::FString sContent; /**< buffer for the current node's content. */
134 FlexBuf fbParamName; /**< buffer for the current param's name. */ 134 Bu::FString sParamName; /**< buffer for the current param's name. */
135 FlexBuf fbParamValue; /**< buffer for the current param's value. */ 135 Bu::FString sParamValue; /**< buffer for the current param's value. */
136 bool bStrip; /**< Are we stripping whitespace? */ 136 Bu::Stream &sIn;
137 bool bStrip; /**< Are we stripping whitespace? */
137 138
138 HashTable htEntity; /**< Entity type definitions. */ 139 Bu::Hash<Bu::FString,Bu::FString> htEntity; /**< Entity type definitions. */
140
141 Bu::FString sBuf;
139}; 142};
140 143
141#endif 144#endif