HTML_SERIALIZE(3)

NAME
html_serialize - add attribute to a HTML node

SYNOPSIS

#include <slweb/html.h>

int html_serialize(const struct html_node *n, struct dynstr *d);

DESCRIPTION
The html_serialize(3) function takes a struct html_node object pointed to by n and serializes it as a HTML file, as well as all of its children nodes, into a null-terminated string. d is a struct dynstr object that must be previously initialized by a call to dynstr_init(3), to which the null-terminated string shall be written.

RETURN VALUE
On success, html_serialize(3) returns zero. On failure, a negative integer is returned.

ERRORS
No errors are defined.

SEE ALSO
html_node_alloc(3), html_node_free(3), html_node_add_attr(3), html_node_set_value(3), html_node_set_value_unescaped(3), slweb_http(7).

COPYRIGHT
Copyright (C) 2023 Xavier Del Campo Romero.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.