From d26f046fc9149693a6ebc28301ccc3581c0f144e Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Mon, 9 Jan 2023 01:22:54 +0100 Subject: Initial commit --- html.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 html.h (limited to 'html.h') 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 + +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 */ -- cgit v1.2.3