aboutsummaryrefslogtreecommitdiff
path: root/html.h
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-01-09 01:22:54 +0100
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-07-20 23:52:47 +0200
commit2968c5f67daa1c571f5f9cf9445de907f9490636 (patch)
treed6919b2446976f4818c62ad419065e3d92061e25 /html.h
downloadlibweb-2968c5f67daa1c571f5f9cf9445de907f9490636.tar.gz
Initial commit
Diffstat (limited to 'html.h')
-rw-r--r--html.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/html.h b/html.h
new file mode 100644
index 0000000..e62575e
--- /dev/null
+++ b/html.h
@@ -0,0 +1,15 @@
+#ifndef HTML_H
+#define HTML_H
+
+#include <dynstr.h>
+
+struct html_node *html_node_alloc(const char *element);
+void html_node_free(struct html_node *n);
+int html_node_set_value(struct html_node *n, const char *val);
+int html_node_set_value_unescaped(struct html_node *n, const char *val);
+int html_node_add_attr(struct html_node *n, const char *attr, const char *val);
+struct html_node *html_node_add_child(struct html_node *n, const char *elem);
+void html_node_add_sibling(struct html_node *n, struct html_node *sibling);
+int html_serialize(const struct html_node *n, struct dynstr *d);
+
+#endif /* HTML_H */