txml.h - webdump - [FORK] git://git.codemadness.org/webdump
 (HTM) git clone git://git.z3bra.org/webdump.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       txml.h (1613B)
       ---
            1 #ifndef _XML_H
            2 #define _XML_H
            3 
            4 typedef struct xmlparser {
            5         /* handlers */
            6         void (*xmlattr)(struct xmlparser *, const char *, size_t,
            7               const char *, size_t, const char *, size_t);
            8         void (*xmlattrend)(struct xmlparser *, const char *, size_t,
            9               const char *, size_t);
           10         void (*xmlattrstart)(struct xmlparser *, const char *, size_t,
           11               const char *, size_t);
           12         void (*xmlattrentity)(struct xmlparser *, const char *, size_t,
           13               const char *, size_t, const char *, size_t);
           14         void (*xmlcdatastart)(struct xmlparser *);
           15         void (*xmlcdata)(struct xmlparser *, const char *, size_t);
           16         void (*xmlcdataend)(struct xmlparser *);
           17         void (*xmlcommentstart)(struct xmlparser *);
           18         void (*xmlcomment)(struct xmlparser *, const char *, size_t);
           19         void (*xmlcommentend)(struct xmlparser *);
           20         void (*xmldata)(struct xmlparser *, const char *, size_t);
           21         void (*xmldataend)(struct xmlparser *);
           22         void (*xmldataentity)(struct xmlparser *, const char *, size_t);
           23         void (*xmldatastart)(struct xmlparser *);
           24         void (*xmltagend)(struct xmlparser *, const char *, size_t, int);
           25         void (*xmltagstart)(struct xmlparser *, const char *, size_t);
           26         void (*xmltagstartparsed)(struct xmlparser *, const char *,
           27               size_t, int);
           28 
           29         #define GETNEXT (x)->getnext
           30         int (*getnext)(void);
           31 
           32         /* current tag */
           33         char tag[1024];
           34         size_t taglen;
           35         /* current tag is in short form ? <tag /> */
           36         int isshorttag;
           37         /* current attribute name */
           38         char name[1024];
           39         /* data buffer used for tag data, cdata and attribute data */
           40         char data[BUFSIZ];
           41 } XMLParser;
           42 
           43 int xml_entitytostr(const char *, char *, size_t);
           44 void xml_parse(XMLParser *);
           45 #endif