8 n__html_8c
gullradriel edited this page 2026-10-29 20:54:40 +01:00

src/n_html.c

Lightweight HTML/XML extraction: links, forms, and sitemap URLs. More...

Structures

Name
struct N_HTML_TAG_
a single tag picked out by the scanner
struct N_HTML_ATTR_
attribute parsed off an HTML start tag (name lowercased, value raw)

Functions

Name
LIST * n_sitemap_extract_urls(const char * xml, size_t len)
extract URLs from a sitemap.xml as a LIST of N_STR*; free with n_html_links_free
N_STR * n_html_to_text(const char * html, size_t len)
render HTML to readable plain text: drop tags, skip script/style, decode common entities, collapse whitespace, and line-break block elements; returns a new N_STR (free with free_nstr) or NULL
void n_html_links_free(LIST ** links)
free a list returned by n_html_extract_links or n_sitemap_extract_urls
void n_html_forms_free(LIST ** forms)
free a list returned by n_html_extract_forms
LIST * n_html_extract_scripts(const char * html, size_t len)
extract the inline