summaryrefslogtreecommitdiff
path: root/src/xml/xml.h
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2023-02-06 01:01:22 -0600
committersanine <sanine.not@pm.me>2023-02-06 01:01:22 -0600
commit3d1afa579c9ce045c87e4b68a6d6068a389251a0 (patch)
treee4e569dcd1b6ae798ff59fb640dfb1ab2ff76eed /src/xml/xml.h
parentc5936b5e28c8f81e974bd8d9eb901832921c2b78 (diff)
add kai_tag_get_first_child_with_type() and kai_tag_get_next_sibling_with_type()
Diffstat (limited to 'src/xml/xml.h')
-rw-r--r--src/xml/xml.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/xml/xml.h b/src/xml/xml.h
index 41d4006..4849ced 100644
--- a/src/xml/xml.h
+++ b/src/xml/xml.h
@@ -29,4 +29,10 @@ char *kai_tag_attr_to_dup(struct kai_tag_t *t, const char *attr);
/* return the number of immediate children of a node */
int kai_tag_num_children(struct kai_tag_t *t);
+/* get the first child of type "type", or NULL if no such child exists */
+struct kai_tag_t * kai_tag_get_first_child_with_type(struct kai_tag_t *t, char *type);
+
+/* get the next sibling of type "type", or NULL if no such sibling exists */
+struct kai_tag_t * kai_tag_get_next_sibling_with_type(struct kai_tag_t *t, char *type);
+
#endif