summaryrefslogtreecommitdiff
path: root/ext/soap/php_encoding.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2004-04-23 12:22:41 +0000
committerDmitry Stogov <dmitry@php.net>2004-04-23 12:22:41 +0000
commiteba2aa9bd046b98b5122186d01106561bb8ede29 (patch)
treec41567b443e6a3b91b3b3144d636ac128a558828 /ext/soap/php_encoding.c
parentd5e0742e8d4ea4a34ee9ea82d8e830be132f6a2b (diff)
downloadphp-git-eba2aa9bd046b98b5122186d01106561bb8ede29.tar.gz
Support for <![CDATA[ ]]> for string/hexbinary/base64binary data
Diffstat (limited to 'ext/soap/php_encoding.c')
-rw-r--r--ext/soap/php_encoding.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c
index 451a659615..5bda11a881 100644
--- a/ext/soap/php_encoding.c
+++ b/ext/soap/php_encoding.c
@@ -461,6 +461,8 @@ static zval *to_zval_string(encodeTypePtr type, xmlNodePtr data)
if (data && data->children) {
if (data->children->type == XML_TEXT_NODE && data->children->next == NULL) {
ZVAL_STRING(ret, data->children->content, 1);
+ } else if (data->children->type == XML_CDATA_SECTION_NODE && data->children->next == NULL) {
+ ZVAL_STRING(ret, data->children->content, 1);
} else {
php_error(E_ERROR,"SOAP-ERROR: Encoding: Violation of encoding rules");
}
@@ -479,6 +481,8 @@ static zval *to_zval_stringr(encodeTypePtr type, xmlNodePtr data)
if (data->children->type == XML_TEXT_NODE && data->children->next == NULL) {
whiteSpace_replace(data->children->content);
ZVAL_STRING(ret, data->children->content, 1);
+ } else if (data->children->type == XML_CDATA_SECTION_NODE && data->children->next == NULL) {
+ ZVAL_STRING(ret, data->children->content, 1);
} else {
php_error(E_ERROR,"SOAP-ERROR: Encoding: Violation of encoding rules");
}
@@ -497,6 +501,8 @@ static zval *to_zval_stringc(encodeTypePtr type, xmlNodePtr data)
if (data->children->type == XML_TEXT_NODE && data->children->next == NULL) {
whiteSpace_collapse(data->children->content);
ZVAL_STRING(ret, data->children->content, 1);
+ } else if (data->children->type == XML_CDATA_SECTION_NODE && data->children->next == NULL) {
+ ZVAL_STRING(ret, data->children->content, 1);
} else {
php_error(E_ERROR,"SOAP-ERROR: Encoding: Violation of encoding rules");
}