diff options
author | m0gg | 2007-11-03 22:40:09 +0000 |
---|---|---|
committer | m0gg | 2007-11-03 22:40:09 +0000 |
commit | 8a6946b18003fae6400a137389f0cb13d0ac4bd6 (patch) | |
tree | 1fb0e6f58de5596f8dae00998da18472fb4952a1 /libcsoap/soap-xml.c | |
parent | c1a7b2dabdc691139b744f0d4750f3b797b69073 (diff) | |
download | csoap-8a6946b18003fae6400a137389f0cb13d0ac4bd6.tar.gz csoap-8a6946b18003fae6400a137389f0cb13d0ac4bd6.tar.bz2 |
Split nanoHTTP and cSOAP logging
Diffstat (limited to 'libcsoap/soap-xml.c')
-rw-r--r-- | libcsoap/soap-xml.c | 33 |
1 files changed, 7 insertions, 26 deletions
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 <libxml/tree.h> -#include <libxml/xpath.h> -#include <libxml/xpathInternals.h> - -#include <nanohttp/nanohttp-logging.h> +#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) { |