diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2012-11-10 11:20:31 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2012-11-10 11:44:38 +0000 |
commit | a79e0988174c51b44e9e549d8026e38ad4839e1a (patch) | |
tree | 092d1718e8e66fd32a0fc2af9d5205408da10128 /utils/libdom.h | |
parent | 617d655c7bbcccd5168514c9d29e5b329eec63d4 (diff) | |
download | netsurf-a79e0988174c51b44e9e549d8026e38ad4839e1a.tar.gz netsurf-a79e0988174c51b44e9e549d8026e38ad4839e1a.tar.bz2 |
remove redundant domutils and put functionality in existing utils/libdom
Diffstat (limited to 'utils/libdom.h')
-rw-r--r-- | utils/libdom.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/utils/libdom.h b/utils/libdom.h index e5a7c20c1..f2da40570 100644 --- a/utils/libdom.h +++ b/utils/libdom.h @@ -48,4 +48,20 @@ bool libdom_treewalk(dom_node *root, */ dom_node *libdom_find_element(dom_node *node, lwc_string *element_name); +/** + * Search children of a node for first named element + * \param parent dom_node to search children of, or NULL + * \param element_name name of element to find + * \return first child of node which is an element and matches name, or + * NULL if not found or parameter node is NULL + */ +dom_node *libdom_find_first_element(dom_node *parent, lwc_string *element_name); + +typedef bool (*libdom_iterate_cb)(dom_node *node, void *ctx); + +void libdom_iterate_child_elements(dom_node *parent, + libdom_iterate_cb cb, void *ctx); + +dom_document *libdom_parse_file(const char *filename, const char *encoding); + #endif |