summaryrefslogtreecommitdiff
path: root/ext/soap/php_xml.c
diff options
context:
space:
mode:
authorMark A. Hershberger <mah@debian.(none)>2009-03-25 00:36:21 -0400
committerMark A. Hershberger <mah@debian.(none)>2009-03-25 00:36:21 -0400
commitd29a4fd2dd3b5d4cf6e80b602544d7b71d794e76 (patch)
treeb38e2e5c6974b9a15f103e5cf884cba9fff90ef4 /ext/soap/php_xml.c
parenta88a88d0986a4a32288c102cdbfebd78d7e91d99 (diff)
downloadphp-d29a4fd2dd3b5d4cf6e80b602544d7b71d794e76.tar.gz
Imported Upstream version 5.2.0upstream/5.2.0
Diffstat (limited to 'ext/soap/php_xml.c')
-rw-r--r--ext/soap/php_xml.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c
index 354c9507e..db3159151 100644
--- a/ext/soap/php_xml.c
+++ b/ext/soap/php_xml.c
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_xml.c,v 1.25.2.1 2006/01/01 12:50:13 sniper Exp $ */
+/* $Id: php_xml.c,v 1.25.2.1.2.1 2006/07/11 14:24:18 dmitry Exp $ */
#include "php_soap.h"
#include "libxml/parser.h"
@@ -26,7 +26,7 @@
/* Channel libxml file io layer through the PHP streams subsystem.
* This allows use of ftps:// and https:// urls */
-static int is_blank(const char* str)
+static int is_blank(const xmlChar* str)
{
while (*str != '\0') {
if (*str != ' ' && *str != 0x9 && *str != 0xa && *str != 0xd) {
@@ -101,7 +101,7 @@ xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC)
if (ctxt->wellFormed) {
ret = ctxt->myDoc;
if (ret->URL == NULL && ctxt->directory != NULL) {
- ret->URL = xmlStrdup(ctxt->directory);
+ ret->URL = xmlCharStrdup(ctxt->directory);
}
} else {
ret = NULL;
@@ -142,7 +142,7 @@ xmlDocPtr soap_xmlParseMemory(const void *buf, size_t buf_size)
if (ctxt->wellFormed) {
ret = ctxt->myDoc;
if (ret->URL == NULL && ctxt->directory != NULL) {
- ret->URL = xmlStrdup(ctxt->directory);
+ ret->URL = xmlCharStrdup(ctxt->directory);
}
} else {
ret = NULL;
@@ -214,11 +214,11 @@ xmlNsPtr node_find_ns(xmlNodePtr node)
int attr_is_equal_ex(xmlAttrPtr node, char *name, char *ns)
{
- if (name == NULL || strcmp(node->name, name) == 0) {
+ if (name == NULL || strcmp((char*)node->name, name) == 0) {
if (ns) {
xmlNsPtr nsPtr = attr_find_ns(node);
if (nsPtr) {
- return (strcmp(nsPtr->href, ns) == 0);
+ return (strcmp((char*)nsPtr->href, ns) == 0);
} else {
return FALSE;
}
@@ -230,11 +230,11 @@ int attr_is_equal_ex(xmlAttrPtr node, char *name, char *ns)
int node_is_equal_ex(xmlNodePtr node, char *name, char *ns)
{
- if (name == NULL || strcmp(node->name, name) == 0) {
+ if (name == NULL || strcmp((char*)node->name, name) == 0) {
if (ns) {
xmlNsPtr nsPtr = node_find_ns(node);
if (nsPtr) {
- return (strcmp(nsPtr->href, ns) == 0);
+ return (strcmp((char*)nsPtr->href, ns) == 0);
} else {
return FALSE;
}
@@ -296,7 +296,7 @@ xmlNodePtr get_node_with_attribute_ex(xmlNodePtr node, char *name, char *name_ns
}
attr = get_attribute_ex(node->properties, attribute, attr_ns);
- if (attr != NULL && strcmp(attr->children->content, value) == 0) {
+ if (attr != NULL && strcmp((char*)attr->children->content, value) == 0) {
return node;
}
node = node->next;
@@ -309,7 +309,7 @@ xmlNodePtr get_node_with_attribute_recursive_ex(xmlNodePtr node, char *name, cha
while (node != NULL) {
if (node_is_equal_ex(node, name, name_ns)) {
xmlAttrPtr attr = get_attribute_ex(node->properties, attribute, attr_ns);
- if (attr != NULL && strcmp(attr->children->content, value) == 0) {
+ if (attr != NULL && strcmp((char*)attr->children->content, value) == 0) {
return node;
}
}
@@ -324,15 +324,15 @@ xmlNodePtr get_node_with_attribute_recursive_ex(xmlNodePtr node, char *name, cha
return NULL;
}
-int parse_namespace(const char *inval, char **value, char **namespace)
+int parse_namespace(const xmlChar *inval, char **value, char **namespace)
{
- char *found = strrchr(inval, ':');
+ char *found = strrchr((char*)inval, ':');
- if (found != NULL && found != inval) {
- (*namespace) = estrndup(inval, found - inval);
+ if (found != NULL && found != (char*)inval) {
+ (*namespace) = estrndup((char*)inval, found - (char*)inval);
(*value) = estrdup(++found);
} else {
- (*value) = estrdup(inval);
+ (*value) = estrdup((char*)inval);
(*namespace) = NULL;
}