summaryrefslogtreecommitdiffstats
path: root/lasso/xml/saml_subject_confirmation.c
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@entrouvert.com>2004-11-17 17:18:51 +0000
committerFrederic Peters <fpeters@entrouvert.com>2004-11-17 17:18:51 +0000
commitcfc07351978eef632c1b06f06f7246c2860cfc9c (patch)
tree48a7d9f6507e35a980e530efad2f58b757510417 /lasso/xml/saml_subject_confirmation.c
parent5c353c8fe9b439478c333c7ec1604a4d12fcadaa (diff)
downloadlasso-cfc07351978eef632c1b06f06f7246c2860cfc9c.tar.gz
lasso-cfc07351978eef632c1b06f06f7246c2860cfc9c.tar.xz
lasso-cfc07351978eef632c1b06f06f7246c2860cfc9c.zip
refactored init_from_xml functions (lasso is now less than 20000 lines)
Diffstat (limited to 'lasso/xml/saml_subject_confirmation.c')
-rw-r--r--lasso/xml/saml_subject_confirmation.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/lasso/xml/saml_subject_confirmation.c b/lasso/xml/saml_subject_confirmation.c
index 86dc9759..317632c8 100644
--- a/lasso/xml/saml_subject_confirmation.c
+++ b/lasso/xml/saml_subject_confirmation.c
@@ -67,25 +67,16 @@ get_xmlNode(LassoNode *node)
static int
init_from_xml(LassoNode *node, xmlNode *xmlnode)
{
- xmlNode *t;
LassoSamlSubjectConfirmation *confirm = LASSO_SAML_SUBJECT_CONFIRMATION(node);
+ struct XmlSnippet snippets[] = {
+ { "ConfirmationMethod", 'c', (void**)&(confirm->ConfirmationMethod) },
+ { "SubjectConfirmationData", 'c', (void**)&(confirm->SubjectConfirmationData) },
+ { NULL, 0, NULL}
+ };
if (parent_class->init_from_xml(node, xmlnode))
return -1;
-
- t = xmlnode->children;
- while (t) {
- if (t->type != XML_ELEMENT_NODE) {
- t = t->next;
- continue;
- }
-
- if (strcmp(t->name, "ConfirmationMethod") == 0)
- confirm->ConfirmationMethod = xmlNodeGetContent(t);
- if (strcmp(t->name, "SubjectConfirmationData") == 0)
- confirm->SubjectConfirmationData = xmlNodeGetContent(t);
- t = t->next;
- }
+ lasso_node_init_xml_with_snippets(xmlnode, snippets);
return 0;
}