aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-xml-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'e-util/e-xml-utils.c')
-rw-r--r--e-util/e-xml-utils.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/e-util/e-xml-utils.c b/e-util/e-xml-utils.c
index 7c6356dbef..e6f361392b 100644
--- a/e-util/e-xml-utils.c
+++ b/e-util/e-xml-utils.c
@@ -34,3 +34,13 @@ xmlNode *e_xml_get_child_by_name(xmlNode *parent, xmlChar *child_name)
}
return NULL;
}
+
+int
+e_xml_get_integer_prop_by_name(xmlNode *parent, xmlChar *prop_name)
+{
+ xmlChar *prop = xmlGetProp(parent, prop_name);
+ if (prop)
+ return atoi(prop);
+ else
+ return 0;
+}