Changeset 12 for trunk/src/helpers/xml.c


Ignore:
Timestamp:
Nov 4, 2000, 8:55:45 PM (25 years ago)
Author:
umoeller
Message:

Updated string helpers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/xml.c

    r11 r12  
    4040 *      2)  This doesn't use 16-bit characters, but 8-bit characters.
    4141 *
    42  *@@header "xml.h"
     42 *@@header "helpers\xml.h"
    4343 *@@added V0.9.6 (2000-10-29) [umoeller]
    4444 */
     
    7777
    7878/*
    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 ********************************************************************/
    8187
    8288/*
     
    183189    return (ulrc);
    184190}
     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
     240PSZ xmlTokenize(const char *pcszXML)
     241{
     242}
     243
     244/* ******************************************************************
     245 *
     246 *   Parsing
     247 *
     248 ********************************************************************/
    185249
    186250/*
     
    308372                                    && (*pFirstAfterTagName != '\n')
    309373                                    && (*pFirstAfterTagName != '\r')
     374                                    && (*pFirstAfterTagName != '\t')        // tab
    310375                                    && (*pFirstAfterTagName != '>')
    311376                                  )
     
    405470
    406471                case ' ':
     472                case '\t':  // tab
    407473                case '\n':
    408474                case '\r':
     
    475541
    476542                            case ' ':
     543                            case '\t':  // tab
    477544                            case '\n':
    478545                            case '\r':
Note: See TracChangeset for help on using the changeset viewer.