diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2010-10-08 17:02:47 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2010-10-08 17:02:47 +0200 |
| commit | 10c6b1f0978710cf5a9f309b6fdcaef922f9b07f (patch) | |
| tree | 00679d479d9554f91f5d3beb4f4e709705ba55df /src/xml-parser.c | |
| parent | 5fc53d25a171fbd85ee09c9fc771580350d689c8 (diff) | |
| download | cataract-10c6b1f0978710cf5a9f309b6fdcaef922f9b07f.tar.xz | |
Add basic Atom feed writer
Diffstat (limited to 'src/xml-parser.c')
| -rw-r--r-- | src/xml-parser.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/xml-parser.c b/src/xml-parser.c index ee40dad..70c7528 100644 --- a/src/xml-parser.c +++ b/src/xml-parser.c @@ -210,6 +210,19 @@ xml_file_get_node_attribute_long (TXMLFile *file, const gchar *x_path, const gch return i; } +gboolean +xml_file_get_node_attribute_boolean (TXMLFile *file, const gchar *x_path, const gchar *attr, const gboolean _default) +{ + gchar *s; + gboolean b; + + s = xml_file_get_node_attribute (file, x_path, attr); + b = s ? (strcasecmp (s, "yes") == 0 || strcasecmp (s, "true") == 0) : _default; + g_free (s); + return b; +} + + /* * xml_file_get_node_present: existency test of the XPath node */ |
