home *** CD-ROM | disk | FTP | other *** search
/ CGI How-To / CGI HOW-TO.iso / chap5 / 5_3 / input_c / parsehtm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-06-15  |  934 b   |  36 lines

  1.  
  2. #include "string.h"
  3. #include "dict.h"
  4.  
  5. /* Global variables */
  6. extern Dictionary endTags;
  7. extern Dictionary handlerDict;
  8.  
  9. /*
  10.  * Tag Handlers are functions that return void,
  11.  * and take four arguements,
  12.  * 1) the tag string, which they should alter to
  13.  * the parsed text.
  14.  * 2) an arg string, not containing any registered endTags
  15.  * 3) any registered endTag
  16.  * 4) a dictionary of data for the tag, from dictForTag()
  17.  * The keys are of type const char * and the values of type String
  18.  * The prototype for a handler is:
  19.  * void handler(String ts,String as,String et,Dictionary td);
  20.  */
  21.  
  22.  /* The values in endTags should also be of type String. */
  23.  
  24. void initializeHtmlParsingLibrary();
  25.  
  26. String parseHtml(const char *fileName);
  27.  
  28. String mainHtmlParser(const char *stopStr);
  29.  
  30. void handleTag(String tagString);
  31.  
  32. void handlePlainText(String plainText);
  33.  
  34. Dictionary dictForTag(String tagString);
  35.  
  36. String stringForTagDict(Dictionary tagDict);