diff options
Diffstat (limited to 'dom.h')
| -rw-r--r-- | dom.h | 27 |
1 files changed, 26 insertions, 1 deletions
@@ -1,6 +1,31 @@ #ifndef DOM_H #define DOM_H -void init_dom(const char *html); +#include "tags.h" + +struct attr { + const char *key; + size_t keylen; + const char *val; + size_t vallen; + struct attr *next; +}; + +struct node { + tag_type tag; + + const char *text; + size_t textlen; + + struct attr *attrs; + + struct node *parent; + struct node *first_child; + struct node *last_child; + struct node *next_sibling; +}; + +struct node *dom_init(const char *html); +void dom_free(void); #endif /* DOM_H */ |
