From 65985c4e6527c82a75367d9c5418b009dfbc6379 Mon Sep 17 00:00:00 2001 From: m0gg Date: Sun, 26 Nov 2006 20:13:05 +0000 Subject: soap.udp transport added (alpha) --- libcsoap/soap-xml.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'libcsoap/soap-xml.c') 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 #endif +#include #include #include @@ -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) -- cgit v1.1-32-gdbae