Created
October 19, 2020 20:03
-
-
Save lexborisov/fbc6260565adb6d176b9007bdf86c73d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lxb_inline lxb_status_t | |
serializer_callback(const lxb_char_t *data, size_t len, void *ctx) | |
{ | |
printf("%.*s", (int) len, (const char *) data); | |
return LXB_STATUS_OK; | |
} | |
lxb_inline void | |
serialize_node(lxb_dom_node_t *node) | |
{ | |
lxb_status_t status; | |
status = lxb_html_serialize_pretty_cb(node, LXB_HTML_SERIALIZE_OPT_UNDEF, | |
0, serializer_callback, NULL); | |
if (status != LXB_STATUS_OK) { | |
FAILED("Failed to serialization HTML tree"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment