summaryrefslogtreecommitdiff
path: root/src/xml/xml.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xml/xml.c')
-rw-r--r--src/xml/xml.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/xml/xml.c b/src/xml/xml.c
index e2aa008..33782c4 100644
--- a/src/xml/xml.c
+++ b/src/xml/xml.c
@@ -18,3 +18,16 @@ struct kai_tag_t * kai_parse_string(const char *str)
return document;
}
+
+
+char * kai_tag_get_attr(struct kai_tag_t *t, const char *attr)
+{
+ struct kai_attr_t *a = t->attrs;
+ while (a != NULL) {
+ if (strcmp(a->key, attr) == 0) {
+ return a->value;
+ }
+ a = a->next;
+ }
+ return NULL;
+}