diff --exclude Jpeg.php --exclude .svn -upr /Users/andreas/tmp/zf1.9.3PL1/Zend/XmlRpc/Response.php /Users/andreas/Workspace/if-trunk/library/ZendFramework-1.9.3PL1/Zend/XmlRpc/Response.php
--- /Users/andreas/tmp/zf1.9.3PL1/Zend/XmlRpc/Response.php 2009-12-03 17:58:03.000000000 +0100
+++ /Users/andreas/Workspace/if-trunk/library/ZendFramework-1.9.3PL1/Zend/XmlRpc/Response.php 2009-12-03 17:44:48.000000000 +0100
@@ -224,17 +224,9 @@ class Zend_XmlRpc_Response
public function saveXML()
{
$value = $this->_getXmlRpcReturn();
- $valueDOM = new DOMDocument('1.0', $this->getEncoding());
- $valueDOM->loadXML($value->saveXML());
-
- $dom = new DOMDocument('1.0', $this->getEncoding());
- $response = $dom->appendChild($dom->createElement('methodResponse'));
- $params = $response->appendChild($dom->createElement('params'));
- $param = $params->appendChild($dom->createElement('param'));
-
- $param->appendChild($dom->importNode($valueDOM->documentElement, true));
-
- return $dom->saveXML();
+ return 'getEncoding() . '"?>'
+ . '' . $value->saveXML() . ''
+ . '';
}
/**
diff --exclude Jpeg.php --exclude .svn -upr /Users/andreas/tmp/zf1.9.3PL1/Zend/XmlRpc/Value/Array.php /Users/andreas/Workspace/if-trunk/library/ZendFramework-1.9.3PL1/Zend/XmlRpc/Value/Array.php
--- /Users/andreas/tmp/zf1.9.3PL1/Zend/XmlRpc/Value/Array.php 2009-12-03 17:58:03.000000000 +0100
+++ /Users/andreas/Workspace/if-trunk/library/ZendFramework-1.9.3PL1/Zend/XmlRpc/Value/Array.php 2009-12-03 17:44:08.000000000 +0100
@@ -56,20 +56,15 @@ class Zend_XmlRpc_Value_Array extends Ze
public function saveXML()
{
if (!$this->_as_xml) { // The XML code was not calculated yet
- $dom = new DOMDocument('1.0');
- $value = $dom->appendChild($dom->createElement('value'));
- $array = $value->appendChild($dom->createElement('array'));
- $data = $array->appendChild($dom->createElement('data'));
-
+ $data = '';
if (is_array($this->_value)) {
foreach ($this->_value as $val) {
/* @var $val Zend_XmlRpc_Value */
- $data->appendChild($dom->importNode($val->getAsDOM(), true));
+ $data .= $val->saveXML();
}
}
-
- $this->_as_dom = $value;
- $this->_as_xml = $this->_stripXmlDeclaration($dom);
+ $this->_as_xml = '' . $data
+ . '';
}
return $this->_as_xml;
diff --exclude Jpeg.php --exclude .svn -upr /Users/andreas/tmp/zf1.9.3PL1/Zend/XmlRpc/Value/Base64.php /Users/andreas/Workspace/if-trunk/library/ZendFramework-1.9.3PL1/Zend/XmlRpc/Value/Base64.php
--- /Users/andreas/tmp/zf1.9.3PL1/Zend/XmlRpc/Value/Base64.php 2009-12-03 17:58:03.000000000 +0100
+++ /Users/andreas/Workspace/if-trunk/library/ZendFramework-1.9.3PL1/Zend/XmlRpc/Value/Base64.php 2009-12-03 18:07:59.000000000 +0100
@@ -74,13 +74,9 @@ class Zend_XmlRpc_Value_Base64 extends Z
public function saveXML()
{
if (! $this->_as_xml) { // The XML was not generated yet
- $dom = new DOMDocument('1.0', 'UTF-8');
- $value = $dom->appendChild($dom->createElement('value'));
- $type = $value->appendChild($dom->createElement($this->_type));
- $type->appendChild($dom->createTextNode($this->_value));
-
- $this->_as_dom = $value;
- $this->_as_xml = $this->_stripXmlDeclaration($dom);
+ $val = $this->_escapeXmlEntities($this->_value); // not getValue() !
+ $this->_as_xml = '<' . $this->_type . '>' . $val
+ . '' . $this->_type . '>';
}
return $this->_as_xml;
diff --exclude Jpeg.php --exclude .svn -upr /Users/andreas/tmp/zf1.9.3PL1/Zend/XmlRpc/Value/Boolean.php /Users/andreas/Workspace/if-trunk/library/ZendFramework-1.9.3PL1/Zend/XmlRpc/Value/Boolean.php
--- /Users/andreas/tmp/zf1.9.3PL1/Zend/XmlRpc/Value/Boolean.php 2009-12-03 17:58:03.000000000 +0100
+++ /Users/andreas/Workspace/if-trunk/library/ZendFramework-1.9.3PL1/Zend/XmlRpc/Value/Boolean.php 2009-12-03 18:10:21.000000000 +0100
@@ -69,13 +69,9 @@ class Zend_XmlRpc_Value_Boolean extends
public function saveXML()
{
if (! $this->_as_xml) { // The XML was not generated yet
- $dom = new DOMDocument('1.0', 'UTF-8');
- $value = $dom->appendChild($dom->createElement('value'));
- $type = $value->appendChild($dom->createElement($this->_type));
- $type->appendChild($dom->createTextNode($this->_value));
-
- $this->_as_dom = $value;
- $this->_as_xml = $this->_stripXmlDeclaration($dom);
+ $val = $this->_escapeXmlEntities($this->_value);
+ $this->_as_xml = '<' . $this->_type . '>' . $val
+ . '' . $this->_type . '>';
}
return $this->_as_xml;
diff --exclude Jpeg.php --exclude .svn -upr /Users/andreas/tmp/zf1.9.3PL1/Zend/XmlRpc/Value/Scalar.php /Users/andreas/Workspace/if-trunk/library/ZendFramework-1.9.3PL1/Zend/XmlRpc/Value/Scalar.php
--- /Users/andreas/tmp/zf1.9.3PL1/Zend/XmlRpc/Value/Scalar.php 2009-12-03 17:58:03.000000000 +0100
+++ /Users/andreas/Workspace/if-trunk/library/ZendFramework-1.9.3PL1/Zend/XmlRpc/Value/Scalar.php 2009-12-03 17:44:23.000000000 +0100
@@ -45,13 +45,9 @@ abstract class Zend_XmlRpc_Value_Scalar
public function saveXML()
{
if (!$this->_as_xml) { // The XML code was not calculated yet
- $dom = new DOMDocument('1.0');
- $value = $dom->appendChild($dom->createElement('value'));
- $type = $value->appendChild($dom->createElement($this->_type));
- $type->appendChild($dom->createTextNode($this->getValue()));
-
- $this->_as_dom = $value;
- $this->_as_xml = $this->_stripXmlDeclaration($dom);
+ $val = $this->_escapeXmlEntities($this->getValue());
+ $this->_as_xml = '<' . $this->_type . '>' . $val
+ . '' . $this->_type . '>';
}
return $this->_as_xml;
diff --exclude Jpeg.php --exclude .svn -upr /Users/andreas/tmp/zf1.9.3PL1/Zend/XmlRpc/Value/Struct.php /Users/andreas/Workspace/if-trunk/library/ZendFramework-1.9.3PL1/Zend/XmlRpc/Value/Struct.php
--- /Users/andreas/tmp/zf1.9.3PL1/Zend/XmlRpc/Value/Struct.php 2009-12-03 17:58:03.000000000 +0100
+++ /Users/andreas/Workspace/if-trunk/library/ZendFramework-1.9.3PL1/Zend/XmlRpc/Value/Struct.php 2009-12-03 17:44:30.000000000 +0100
@@ -56,21 +56,18 @@ class Zend_XmlRpc_Value_Struct extends Z
public function saveXML()
{
if (!$this->_as_xml) { // The XML code was not calculated yet
- $dom = new DOMDocument('1.0');
- $value = $dom->appendChild($dom->createElement('value'));
- $struct = $value->appendChild($dom->createElement('struct'));
-
+ $membersXml = '';
if (is_array($this->_value)) {
foreach ($this->_value as $name => $val) {
/* @var $val Zend_XmlRpc_Value */
- $member = $struct->appendChild($dom->createElement('member'));
- $member->appendChild($dom->createElement('name', $this->_escapeXmlEntities($name)));
- $member->appendChild($dom->importNode($val->getAsDOM(), 1));
+ $membersXml .= ''
+ . $this->_escapeXmlEntities($name) . ''
+ . $val->saveXML() . '';
}
}
+ $this->_as_xml .= '' . $membersXml
+ . '';
- $this->_as_dom = $value;
- $this->_as_xml = $this->_stripXmlDeclaration($dom);
}
return $this->_as_xml;