diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-05-25 23:42:40 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-06 06:55:04 +0200 |
commit | 5f968f9b788ff997c21d5463394db2a975d55ed2 (patch) | |
tree | aebf1728893b9497a1b172cedce6a12106b202a1 /include/quickmedia | |
parent | e7365234460fc9fb949a6a9745b7041b04b6a6a4 (diff) |
Fix tests etc
Diffstat (limited to 'include/quickmedia')
-rw-r--r-- | include/quickmedia/HtmlSearch.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/quickmedia/HtmlSearch.h b/include/quickmedia/HtmlSearch.h index 09a17e2..b3b2eaa 100644 --- a/include/quickmedia/HtmlSearch.h +++ b/include/quickmedia/HtmlSearch.h @@ -17,11 +17,17 @@ typedef struct { const void *doc; } QuickMediaHtmlSearch; -/* Returns NULL if attribute doesn't exist or if it doesn't have any value */ +/* + Returns NULL if attribute doesn't exist or if it doesn't have any value. + The result is only valid within the callback function scope. +*/ const char* quickmedia_html_node_get_attribute_value(QuickMediaHtmlNode *self, const char *attribute_name); -/* Returns StringView where data is NULL and size is 0 if node doesn't have any text */ -QuickMediaStringView quickmedia_html_node_get_text(QuickMediaHtmlNode *self); +/* + Returns NULL if the node doesn't have any text. + The result is only valid within the callback function scope. +*/ +const char* quickmedia_html_node_get_text(QuickMediaHtmlNode *self); /* @node is only valid within the callback function scope */ typedef void (*QuickMediaHtmlSearchResultCallback)(QuickMediaHtmlNode *node, void *userdata); @@ -29,6 +35,7 @@ typedef void (*QuickMediaHtmlSearchResultCallback)(QuickMediaHtmlNode *node, voi int quickmedia_html_search_init(QuickMediaHtmlSearch *self, const char *html_source); void quickmedia_html_search_deinit(QuickMediaHtmlSearch *self); +/* Non-standard xpath. Doesn't use '@' symbol for accessing properties */ int quickmedia_html_find_nodes_xpath(QuickMediaHtmlSearch *self, const char *xpath, QuickMediaHtmlSearchResultCallback result_callback, void *userdata); #ifdef __cplusplus |