From 8a6946b18003fae6400a137389f0cb13d0ac4bd6 Mon Sep 17 00:00:00 2001 From: m0gg Date: Sat, 3 Nov 2007 22:40:09 +0000 Subject: Split nanoHTTP and cSOAP logging --- libcsoap/soap-xml.c | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) (limited to 'libcsoap/soap-xml.c') diff --git a/libcsoap/soap-xml.c b/libcsoap/soap-xml.c index f718faf..ffbfbec 100644 --- a/libcsoap/soap-xml.c +++ b/libcsoap/soap-xml.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: soap-xml.c,v 1.13 2006/11/26 20:13:05 m0gg Exp $ +* $Id: soap-xml.c,v 1.14 2007/11/03 22:40:10 m0gg Exp $ * * CSOAP Project: A SOAP client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -26,11 +26,8 @@ #endif #include -#include -#include - -#include +#include "soap-logging.h" #include "soap-xml.h" xmlNodePtr @@ -40,26 +37,28 @@ soap_xml_get_children(xmlNodePtr node) if (node == NULL) { - log_error1("Invalid node (null)"); + log_error("Invalid node (null)"); return NULL; } for (child = node->children; child; child=child->next) { if (child->type == XML_ELEMENT_NODE) + { return child; + } } return NULL; } xmlNodePtr -soap_xml_get_next(xmlNodePtr param) +soap_xml_get_next_element(xmlNodePtr param) { if (param == NULL) { - log_error1("Invalid node (null)"); + log_error("Invalid node (null)"); return NULL; } @@ -76,24 +75,6 @@ soap_xml_get_next(xmlNodePtr param) return node; } -xmlXPathObjectPtr -soap_xpath_eval(xmlDocPtr doc, const char *xpath) -{ - xmlXPathContextPtr context; - xmlXPathObjectPtr result; - - context = xmlXPathNewContext(doc); - result = xmlXPathEvalExpression(BAD_CAST xpath, context); - if (xmlXPathNodeSetIsEmpty(result->nodesetval)) - { - /* no result */ - return NULL; - } - - xmlXPathFreeContext(context); - return result; -} - char * soap_xml_get_text(xmlNodePtr node) { -- cgit v1.1-32-gdbae