summaryrefslogtreecommitdiffstats
path: root/dom.h
diff options
context:
space:
mode:
Diffstat (limited to 'dom.h')
-rw-r--r--dom.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/dom.h b/dom.h
index d336019..ae7c953 100644
--- a/dom.h
+++ b/dom.h
@@ -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 */