summaryrefslogtreecommitdiffstats
path: root/libcsoap/soap-xml.c
diff options
context:
space:
mode:
authorGravatar m0gg2006-11-23 15:27:32 +0000
committerGravatar m0gg2006-11-23 15:27:32 +0000
commit6457c46897d6e0c63476bf4ba4ca14b4844fac0d (patch)
treeb1f892f4f1d7cb58ff50660c73947847447a14ce /libcsoap/soap-xml.c
parent06906cd337028c9e42e10916d08db64e1e22d0f1 (diff)
downloadcsoap-6457c46897d6e0c63476bf4ba4ca14b4844fac0d.tar.gz
csoap-6457c46897d6e0c63476bf4ba4ca14b4844fac0d.tar.bz2
Code cleanup
Diffstat (limited to 'libcsoap/soap-xml.c')
-rw-r--r--libcsoap/soap-xml.c62
1 files changed, 4 insertions, 58 deletions
diff --git a/libcsoap/soap-xml.c b/libcsoap/soap-xml.c
index 801bdd1..e4cc894 100644
--- a/libcsoap/soap-xml.c
+++ b/libcsoap/soap-xml.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: soap-xml.c,v 1.11 2006/07/09 16:24:19 snowdrop Exp $
+* $Id: soap-xml.c,v 1.12 2006/11/23 15:27:33 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -25,6 +25,9 @@
#include <config.h>
#endif
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+
#include <nanohttp/nanohttp-logging.h>
#include "soap-xml.h"
@@ -69,7 +72,6 @@ soap_xml_get_next(xmlNodePtr param)
return node;
}
-
xmlXPathObjectPtr
soap_xpath_eval(xmlDocPtr doc, const char *xpath)
{
@@ -88,62 +90,6 @@ soap_xpath_eval(xmlDocPtr doc, const char *xpath)
return result;
}
-
-int
-soap_xpath_foreach(xmlDocPtr doc, const char *xpath,
- soap_xmlnode_callback cb, void *userdata)
-{
- int i = 0;
- xmlNodeSetPtr nodeset;
- xmlXPathObjectPtr xpathobj;
-
- xpathobj = soap_xpath_eval(doc, xpath);
-
- if (!xpathobj)
- return 0;
-
- nodeset = xpathobj->nodesetval;
- if (!nodeset)
- return 0;
-
- for (i = 0; i < nodeset->nodeNr; i++)
- {
- if (!cb(nodeset->nodeTab[i], userdata))
- break;
- }
-
- xmlXPathFreeObject((xmlXPathObjectPtr) nodeset);
- return i;
-}
-
-
-void
-soap_xml_doc_print(xmlDocPtr doc)
-{
- xmlBufferPtr buffer;
- xmlNodePtr root;
-
- if (doc == NULL)
- {
- puts("xmlDocPtr is NULL!");
- return;
- }
-
- root = xmlDocGetRootElement(doc);
- if (root == NULL)
- {
- puts("Empty document!");
- return;
- }
-
-
- buffer = xmlBufferCreate();
- xmlNodeDump(buffer, doc, root, 1, 0);
- puts((const char *) xmlBufferContent(buffer));
- xmlBufferFree(buffer);
-
-}
-
char *
soap_xml_get_text(xmlNodePtr node)
{