Commit be2f05d8 authored by meus's avatar meus

Since SimpleXML only output UTF, we say that the XML is UTF-8.

parent b9957ee8
...@@ -88,7 +88,8 @@ class Doctrine_Lib ...@@ -88,7 +88,8 @@ class Doctrine_Lib
$collectionName = Doctrine_Lib::plurelize($collection->getTable()->name); $collectionName = Doctrine_Lib::plurelize($collection->getTable()->name);
if ( ! isset($incomming_xml)) { if ( ! isset($incomming_xml)) {
$xml = new SimpleXMLElement("<" . $collectionName . "></" . $collectionName . ">"); $new_xml_string = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?><" . $recordname . "></" . $recordname . ">";
$xml = new SimpleXMLElement($new_xml_string);
} else { } else {
$xml = $incomming_xml->addChild($collectionName); $xml = $incomming_xml->addChild($collectionName);
} }
...@@ -121,7 +122,8 @@ class Doctrine_Lib ...@@ -121,7 +122,8 @@ class Doctrine_Lib
{ {
$recordname = $record->getTable()->name; $recordname = $record->getTable()->name;
if (!isset($incomming_xml)) { if (!isset($incomming_xml)) {
$xml = new SimpleXMLElement("<" . $recordname . "></" . $recordname . ">"); $new_xml_string = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?><" . $collection_name . "></" . $collection_name . ">";
$xml = new SimpleXMLElement($new_xml_string);
}else{ }else{
$xml = $incomming_xml->addChild($recordname); $xml = $incomming_xml->addChild($recordname);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment