1
0
mirror of synced 2025-01-31 04:21:44 +03:00

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

This commit is contained in:
meus 2007-06-14 12:05:46 +00:00
parent b9957ee870
commit be2f05d8f8

View File

@ -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
{ {
$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);
} }