Changeset 12 for trunk/src/helpers/xml.c
- Timestamp:
- Nov 4, 2000, 8:55:45 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/xml.c
r11 r12 40 40 * 2) This doesn't use 16-bit characters, but 8-bit characters. 41 41 * 42 *@@header " xml.h"42 *@@header "helpers\xml.h" 43 43 *@@added V0.9.6 (2000-10-29) [umoeller] 44 44 */ … … 77 77 78 78 /* 79 *@@category: Helpers\C helpers\XML parsing 80 */ 79 *@@category: Helpers\C helpers\XML\Node management 80 */ 81 82 /* ****************************************************************** 83 * 84 * Node Management 85 * 86 ********************************************************************/ 81 87 82 88 /* … … 183 189 return (ulrc); 184 190 } 191 192 /* 193 *@@category: Helpers\C helpers\XML\Parsing 194 */ 195 196 /* ****************************************************************** 197 * 198 * Tokenizing (Compiling) 199 * 200 ********************************************************************/ 201 202 /* 203 *@@ xmlTokenize: 204 * this takes any block of XML text and "tokenizes" 205 * it. 206 * 207 * Tokenizing (or compiling, or "scanning" in bison/flex 208 * terms) means preparing the XML code for parsing later. 209 * This finds all tags and tag attributes and creates 210 * special codes for them in the output buffer. 211 * 212 * For example: 213 + 214 + <TAG ATTR="text"> block </TAG> 215 + 216 * becomes 217 * 218 + 0xFF escape code 219 + 0x01 tag start code 220 + "TAG" tag name 221 + 0xFF end of tag name code 222 + 223 + 0xFF escape code 224 + 0x03 attribute name code 225 + "ATTR" attribute name 226 + 0xFF 227 + "text" attribute value (without quotes) 228 + 0xFF end of attribute code 229 + 230 + " block " regular text 231 + 232 + 0xFF escape code 233 + 0x01 tag start code 234 + "/TAG" tag name 235 + 0xFF end of tag name code 236 * 237 *@@added V0.9.6 (2000-11-01) [umoeller] 238 */ 239 240 PSZ xmlTokenize(const char *pcszXML) 241 { 242 } 243 244 /* ****************************************************************** 245 * 246 * Parsing 247 * 248 ********************************************************************/ 185 249 186 250 /* … … 308 372 && (*pFirstAfterTagName != '\n') 309 373 && (*pFirstAfterTagName != '\r') 374 && (*pFirstAfterTagName != '\t') // tab 310 375 && (*pFirstAfterTagName != '>') 311 376 ) … … 405 470 406 471 case ' ': 472 case '\t': // tab 407 473 case '\n': 408 474 case '\r': … … 475 541 476 542 case ' ': 543 case '\t': // tab 477 544 case '\n': 478 545 case '\r':
Note:
See TracChangeset
for help on using the changeset viewer.