summaryrefslogtreecommitdiffstats
path: root/lasso
diff options
context:
space:
mode:
Diffstat (limited to 'lasso')
-rw-r--r--lasso/xml/private.h1
-rw-r--r--lasso/xml/tools.c14
2 files changed, 15 insertions, 0 deletions
diff --git a/lasso/xml/private.h b/lasso/xml/private.h
index 6927229e..1214681a 100644
--- a/lasso/xml/private.h
+++ b/lasso/xml/private.h
@@ -229,6 +229,7 @@ xmlDocPtr lasso_xml_parse_memory_with_error(const char *buffer, int size, xmlErr
xmlSecKeyPtr lasso_xmlsec_load_key_info(xmlNode *key_descriptor);
char* lasso_xmlnode_to_string(xmlNode *node, gboolean format, int level);
gboolean lasso_string_to_xsd_integer(const char *str, long int *integer);
+void lasso_set_string_from_prop(char **str, xmlNode *node, xmlChar *name, xmlChar *ns);
#ifdef __cplusplus
}
diff --git a/lasso/xml/tools.c b/lasso/xml/tools.c
index cf16e333..62c413c7 100644
--- a/lasso/xml/tools.c
+++ b/lasso/xml/tools.c
@@ -2164,3 +2164,17 @@ lasso_string_to_xsd_integer(const char *str, long int *integer)
return FALSE;
return TRUE;
}
+
+void
+lasso_set_string_from_prop(char **str, xmlNode *node, xmlChar *name, xmlChar *ns)
+{
+ xmlChar *value;
+
+ g_assert(str);
+ g_assert(node);
+ value = xmlGetNsProp(node, name, ns);
+ if (value) {
+ lasso_assign_string(*str, (char*)value);
+ }
+ lasso_release_xml_string(value);
+}