diff options
author | m0gg | 2006-11-26 20:13:05 +0000 |
---|---|---|
committer | m0gg | 2006-11-26 20:13:05 +0000 |
commit | 65985c4e6527c82a75367d9c5418b009dfbc6379 (patch) | |
tree | 2050e9f4ccd9f460c3f3dbb27446baaa0fbbd9ae /libcsoap/soap-xml.c | |
parent | c8705844bd924e8e00bc79ec0f4ae92c85f7e48e (diff) | |
download | csoap-65985c4e6527c82a75367d9c5418b009dfbc6379.tar.gz csoap-65985c4e6527c82a75367d9c5418b009dfbc6379.tar.bz2 |
soap.udp transport added (alpha)
Diffstat (limited to 'libcsoap/soap-xml.c')
-rw-r--r-- | libcsoap/soap-xml.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/libcsoap/soap-xml.c b/libcsoap/soap-xml.c index e4cc894..f718faf 100644 --- a/libcsoap/soap-xml.c +++ b/libcsoap/soap-xml.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: soap-xml.c,v 1.12 2006/11/23 15:27:33 m0gg Exp $ +* $Id: soap-xml.c,v 1.13 2006/11/26 20:13:05 m0gg Exp $ * * CSOAP Project: A SOAP client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -25,6 +25,7 @@ #include <config.h> #endif +#include <libxml/tree.h> #include <libxml/xpath.h> #include <libxml/xpathInternals.h> @@ -33,32 +34,35 @@ #include "soap-xml.h" xmlNodePtr -soap_xml_get_children(xmlNodePtr param) +soap_xml_get_children(xmlNodePtr node) { - xmlNodePtr children; + xmlNodePtr child; - if (param == NULL) + if (node == NULL) { - log_error1("Invalid parameter 'param' (null)"); + log_error1("Invalid node (null)"); return NULL; } - children = param->xmlChildrenNode; - while (children != NULL) + for (child = node->children; child; child=child->next) { - if (children->type != XML_ELEMENT_NODE) - children = children->next; - else - break; + if (child->type == XML_ELEMENT_NODE) + return child; } - return children; + return NULL; } xmlNodePtr soap_xml_get_next(xmlNodePtr param) { + if (param == NULL) + { + log_error1("Invalid node (null)"); + return NULL; + } + xmlNodePtr node = param->next; while (node != NULL) |