#include <XMLOutput.hpp>
Inheritance diagram for XMLOutput::

Public Methods | |
| void OUTPUT_STATIC | Init (unsigned char myintentation, unsigned char myvaluespacing=0, unsigned char mycoldelta=1) |
| XMLOutput () | |
| virtual void OUTPUT_STATIC | startElement (char *str, int len) |
| virtual void OUTPUT_STATIC | endElement (char *str, int len) |
| virtual void OUTPUT_STATIC | endEmptyElement () |
| virtual void OUTPUT_STATIC | startAttribute (char *str, int len) |
| virtual void OUTPUT_STATIC | endAttribute (char *str=NULL, int len=0) |
| virtual void OUTPUT_STATIC | characters (char *str, int len) |
| virtual void OUTPUT_STATIC | whitespaces (char *str, int len) |
| virtual void OUTPUT_STATIC | attribWhitespaces (char *str, int len) |
|
|
Definition at line 98 of file XMLOutput.hpp. 00099 {
00100 Init(XMLINTENT_NONE);
00101 }
|
|
||||||||||||||||
|
Definition at line 86 of file XMLOutput.hpp. Referenced by InterpretOptionString(), and XMLOutput().
00087 {
00088 curcol=0;
00089 coldelta=mycoldelta;
00090 x.intentation=myintentation;
00091
00092 x.status=XMLOUTPUT_INIT;
00093 x.isinattrib=0;
00094
00095 x.valuespacing=myvaluespacing;
00096 }
|
|
||||||||||||
|
Reimplemented from ISAXClient. Definition at line 262 of file XMLOutput.hpp. 00263 {
00264 char *ptr=GetDataPtr(len);
00265 mymemcpy(ptr,str,len);
00266 x.attribwhitespace=1;
00267 }
|
|
||||||||||||
|
Reimplemented from ISAXClient. Definition at line 238 of file XMLOutput.hpp. 00239 {
00240 switch(x.status)
00241 {
00242 case XMLOUTPUT_OPENATTRIB:
00243 StoreData(str,len);
00244 return;
00245
00246 case XMLOUTPUT_OPENLABEL:
00247 StoreChar('>');
00248
00249 case XMLOUTPUT_AFTERDATA:
00250 case XMLOUTPUT_AFTERENDLABEL:
00251 case XMLOUTPUT_INIT:
00252 StoreData(str,len);
00253 }
00254 x.status=XMLOUTPUT_AFTERDATA;
00255 }
|
|
||||||||||||
|
Reimplemented from ISAXClient. Definition at line 227 of file XMLOutput.hpp. 00228 {
00229 if(x.status!=XMLOUTPUT_OPENATTRIB)
00230 {
00231 Error("Could not finish attribute outside of start element!");
00232 Exit();
00233 }
00234 StoreChar('"');
00235 x.status=XMLOUTPUT_OPENLABEL;
00236 }
|
|
||||||||||||
|
Reimplemented from ISAXClient. Definition at line 137 of file XMLOutput.hpp. 00138 {
00139 char *ptr;
00140 switch(x.status)
00141 {
00142 case XMLOUTPUT_OPENLABEL:
00143 ptr=GetDataPtr(len+4);
00144 *(ptr++)='>';
00145 *(ptr++)='<';
00146 *(ptr++)='/';
00147 mymemcpy(ptr,str,len);
00148 ptr+=len;
00149 *(ptr++)='>';
00150 curcol-=coldelta;
00151 x.status=XMLOUTPUT_AFTERENDLABEL;
00152 return;
00153
00154 case XMLOUTPUT_AFTERENDLABEL:
00155 GotoNextLine(0);
00156 break;
00157
00158 case XMLOUTPUT_AFTERDATA:
00159 curcol-=coldelta;
00160 break;
00161
00162 default:
00163 Error("Invalid end tag");
00164 Exit();
00165 }
00166
00167 ptr=GetDataPtr(len+3);
00168
00169 *(ptr++)='<';
00170 *(ptr++)='/';
00171 mymemcpy(ptr,str,len);
00172 ptr+=len;
00173 *(ptr++)='>';
00174
00175 x.status=XMLOUTPUT_AFTERENDLABEL;
00176 }
|
|
|
Reimplemented from ISAXClient. Definition at line 178 of file XMLOutput.hpp. 00179 {
00180 char *ptr;
00181 if(x.status!=XMLOUTPUT_OPENLABEL)
00182 // Something is wrong !!
00183 return;
00184
00185 ptr=GetDataPtr(2);
00186 *(ptr++)='/';
00187 *(ptr++)='>';
00188
00189 x.status=XMLOUTPUT_AFTERENDLABEL;
00190 curcol-=coldelta;
00191 }
|
|
||||||||||||
|
Reimplemented from ISAXClient. Definition at line 195 of file XMLOutput.hpp. 00196 {
00197 register char *ptr;
00198
00199 if(x.status==XMLOUTPUT_OPENATTRIB)
00200 {
00201 ptr=GetDataPtr(len+(x.attribwhitespace ? 3 : 4));
00202 *(ptr++)='"';
00203 }
00204 else
00205 {
00206 if(x.status!=XMLOUTPUT_OPENLABEL)
00207 {
00208 Error("Cannot print attribute outside of start element!");
00209 Exit();
00210 }
00211 ptr=GetDataPtr(len+(x.attribwhitespace ? 2 : 3));
00212 }
00213 if(x.attribwhitespace==0)
00214 {
00215 *(ptr++)=' ';
00216 x.attribwhitespace=0;
00217 }
00218
00219 mymemcpy(ptr,str,len);
00220 ptr+=len;
00221 *(ptr++)='=';
00222 *(ptr++)='"';
00223
00224 x.status=XMLOUTPUT_OPENATTRIB;
00225 }
|
|
||||||||||||
|
Reimplemented from ISAXClient. Definition at line 107 of file XMLOutput.hpp. 00108 {
00109 switch(x.status)
00110 {
00111 case XMLOUTPUT_OPENLABEL:
00112 StoreChar('>');
00113 GotoNextLine(1);
00114 break;
00115
00116 case XMLOUTPUT_OPENATTRIB:
00117 Error("Cannot start element within attribute!");
00118 Exit();
00119
00120 case XMLOUTPUT_AFTERENDLABEL:
00121 case XMLOUTPUT_AFTERDATA:
00122 GotoNextLine(1);
00123 break;
00124
00125 case XMLOUTPUT_INIT:
00126 curcol+=coldelta;
00127 break;
00128 }
00129 StoreChar('<');
00130
00131 x.status=XMLOUTPUT_OPENLABEL;
00132 StoreData(str,len);
00133
00134 x.attribwhitespace=0;
00135 }
|
|
||||||||||||
|
Reimplemented from ISAXClient. Definition at line 257 of file XMLOutput.hpp. 00258 {
00259 characters(str,len);
00260 }
|
1.2.11.1 written by Dimitri van Heesch,
© 1997-2001