From c929891962b579fcfc1644aa6fcec08b764a1052 Mon Sep 17 00:00:00 2001 From: pookey Date: Wed, 26 Sep 2007 19:56:20 +0000 Subject: [PATCH] removing tabs --- lib/Doctrine/Parser/Xml.php | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/Doctrine/Parser/Xml.php b/lib/Doctrine/Parser/Xml.php index e93c3dcc9..e82539991 100644 --- a/lib/Doctrine/Parser/Xml.php +++ b/lib/Doctrine/Parser/Xml.php @@ -33,25 +33,25 @@ class Doctrine_Parser_Xml extends Doctrine_Parser { public function arrayToXml($data, $rootNodeName = 'data', $xml = null) { - if ($xml === null) { - $xml = new SimpleXmlElement("<$rootNodeName/>"); - } - - foreach($data as $key => $value) - { - if (is_array($value)) { - $node = $xml->addChild($key); - - $this->arrayToXml($value, $rootNodeName, $node); - } else { + if ($xml === null) { + $xml = new SimpleXmlElement("<$rootNodeName/>"); + } + + foreach($data as $key => $value) + { + if (is_array($value)) { + $node = $xml->addChild($key); + + $this->arrayToXml($value, $rootNodeName, $node); + } else { $value = htmlentities($value); - $xml->addChild($key, $value); - } + $xml->addChild($key, $value); + } - } - - return $xml->asXML(); + } + + return $xml->asXML(); } public function dumpData($array, $path = null) @@ -111,4 +111,4 @@ class Doctrine_Parser_Xml extends Doctrine_Parser return array(); } } -} \ No newline at end of file +}