xml.h - grabtitle - stupid HTML title grabber
 (HTM) git clone git://git.codemadness.org/grabtitle
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       xml.h (761B)
       ---
            1 #ifndef XML_H
            2 #define XML_H
            3 
            4 #include <stdio.h>
            5 
            6 typedef struct xmlparser {
            7         /* handlers */
            8         void (*xmlcdata)(struct xmlparser *, const char *, size_t);
            9         void (*xmldata)(struct xmlparser *, const char *, size_t);
           10         void (*xmldataentity)(struct xmlparser *, const char *, size_t);
           11         void (*xmltagend)(struct xmlparser *, const char *, size_t, int);
           12         void (*xmltagstart)(struct xmlparser *, const char *, size_t);
           13 
           14 #define GETNEXT (x)->getnext
           15         int (*getnext)(void);
           16 
           17         /* current tag */
           18         char tag[1024];
           19         size_t taglen;
           20         /* current tag is a short tag ? <tag /> */
           21         int isshorttag;
           22         /* data buffer used for tag data, CDATA and attribute data */
           23         char data[BUFSIZ];
           24 } XMLParser;
           25 
           26 int xml_entitytostr(const char *, char *, size_t);
           27 void xml_parse(XMLParser *);
           28 #endif