diff options
Diffstat (limited to 'framework/Xml')
-rw-r--r-- | framework/Xml/TXmlDocument.php | 7 | ||||
-rw-r--r-- | framework/Xml/TXmlElement.php | 5 | ||||
-rw-r--r-- | framework/Xml/TXmlElementList.php | 3 |
3 files changed, 10 insertions, 5 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; diff --git a/framework/Xml/TXmlElement.php b/framework/Xml/TXmlElement.php index 6ed1c62f..f55afed5 100644 --- a/framework/Xml/TXmlElement.php +++ b/framework/Xml/TXmlElement.php @@ -10,6 +10,9 @@ */ namespace Prado\Xml; +use \Prado\TPropertyValue; +use \Prado\Collections\TList; +use \Prado\Collections\TMap; /** * TXmlElement class. @@ -26,7 +29,7 @@ namespace Prado\Xml; * @package Prado\Xml * @since 3.0 */ -class TXmlElement extends TComponent +class TXmlElement extends \Prado\TComponent { /** * @var TXmlElement parent of this element diff --git a/framework/Xml/TXmlElementList.php b/framework/Xml/TXmlElementList.php index f94d0cf1..ec4d5d21 100644 --- a/framework/Xml/TXmlElementList.php +++ b/framework/Xml/TXmlElementList.php @@ -10,6 +10,7 @@ */ namespace Prado\Xml; +use Prado\Exceptions\TInvalidDataTypeException; /** * TXmlElementList class. @@ -21,7 +22,7 @@ namespace Prado\Xml; * @package Prado\Xml * @since 3.0 */ -class TXmlElementList extends TList +class TXmlElementList extends \Prado\Collections\TList { /** * @var TXmlElement owner of this list |