summaryrefslogtreecommitdiff
path: root/src/xml-parser.c
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2010-12-12 18:40:42 +0100
committerTomas Bzatek <tbzatek@users.sourceforge.net>2010-12-12 18:40:42 +0100
commitbb58d822fb517f4a7a242994bbda3693255b2c74 (patch)
treea12afac60808c810e32774b242eda2a6a58d6de3 /src/xml-parser.c
parent9d995d59d4868a0ed02dc37892d5f670bd4eb86b (diff)
downloadcataract-bb58d822fb517f4a7a242994bbda3693255b2c74.tar.xz
setup: Code cleanup
Diffstat (limited to 'src/xml-parser.c')
-rw-r--r--src/xml-parser.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/xml-parser.c b/src/xml-parser.c
index 3eae5b1..84cc204 100644
--- a/src/xml-parser.c
+++ b/src/xml-parser.c
@@ -152,6 +152,16 @@ xml_file_get_node_value (TXMLFile *file, const gchar *x_path)
return val;
}
+gchar *
+xml_file_get_node_value_with_default (TXMLFile *file, const gchar *x_path, const gchar *_default)
+{
+ gchar *s;
+
+ s = xml_file_get_node_value (file, x_path);
+
+ return s ? s : g_strdup (_default);
+}
+
/*
* xml_file_get_node_attribute: retrieve attribute value from XPath node