summaryrefslogtreecommitdiff
path: root/framework/Xml/TXmlDocument.php
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2015-01-22 09:14:12 +0100
committerFabio Bas <ctrlaltca@gmail.com>2015-01-22 09:14:12 +0100
commit5230f8f8a86fc1ae5d90f8c74ae65c93e197502b (patch)
treee870d29e21c14d5b1683d638dff978afe0a104fa /framework/Xml/TXmlDocument.php
parent53e4cd65205ac33d7dbc61a767f467c1b896dfc6 (diff)
Apply namespaces to class inheritances (pt1)
Diffstat (limited to 'framework/Xml/TXmlDocument.php')
-rw-r--r--framework/Xml/TXmlDocument.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/framework/Xml/TXmlDocument.php b/framework/Xml/TXmlDocument.php
index ca19a0cf..18f0611f 100644
--- a/framework/Xml/TXmlDocument.php
+++ b/framework/Xml/TXmlDocument.php
@@ -10,6 +10,7 @@
*/
namespace Prado\Xml;
+use Prado\Exceptions\TIOException;
/**
* TXmlDocument class.
@@ -138,7 +139,7 @@ class TXmlDocument extends TXmlElement
public function loadFromString($string)
{
// TODO: since PHP 5.1, we can get parsing errors and throw them as exception
- $doc=new DOMDocument();
+ $doc=new \DOMDocument();
if($doc->loadXML($string)===false)
return false;
@@ -175,7 +176,7 @@ class TXmlDocument extends TXmlElement
$attributes->add(($attr->prefix === '' ? '' : $attr->prefix . ':') .$name,$attr->value);
foreach($element->childNodes as $child)
{
- if($child instanceof DOMElement)
+ if($child instanceof \DOMElement)
$elements->add($this->buildElement($child));
}
@@ -243,7 +244,7 @@ class TXmlDocument extends TXmlElement
foreach($node->childNodes as $child)
{
- if($child instanceof DOMElement)
+ if($child instanceof \DOMElement)
$element->getElements()->add($this->buildElement($child));
}
return $element;