#ifndef DOM_H #define DOM_H #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 */