Skip to content

Commit

Permalink
Swap to XML_Util2
Browse files Browse the repository at this point in the history
  • Loading branch information
CloCkWeRX committed Apr 20, 2012
1 parent 3c28640 commit 2bfc467
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
9 changes: 5 additions & 4 deletions XUL/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
*/

/**
* uses XML_Util to create document
* uses XML_Util2 to create document
*/
require_once 'XML/Util.php';
require_once 'XML/Util2.php';

/**
* no filename given
Expand Down Expand Up @@ -270,7 +270,8 @@ function save( $filename = null )
*/
function serialize()
{
$doc = XML_Util::getXMLDeclaration('1.0', $this->_encoding) . "\n";
$util = new XML_Util2();
$doc = $util->getXMLDeclaration('1.0', $this->_encoding) . "\n";

/**
* add the DTD
Expand All @@ -281,7 +282,7 @@ function serialize()
} else {
$root = '';
}
$doc .= XML_Util::getDocTypeDeclaration( $root, $this->_dtd ) . "\n";
$doc .= $util->getDocTypeDeclaration( $root, $this->_dtd ) . "\n";
}

/**
Expand Down
5 changes: 3 additions & 2 deletions XUL/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ function toXML()
*/
function serialize()
{
$util = new XML_Util2();
$content = '';

if (empty($this->_ns)) {
Expand All @@ -451,7 +452,7 @@ function serialize()
if ($this->cdata !== null) {
$content = $this->cdata;
if ($this->replaceEntities) {
$content = XML_Util::replaceEntities($content);
$content = $util->replaceEntities($content);
}
}
} else {
Expand All @@ -470,7 +471,7 @@ function serialize()
$nsUri = null;
}

return XML_Util::createTag(
return $util->createTag(
$el,
$this->attributes,
$content,
Expand Down
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ XML_XUL provides a API similar to DOM to create XUL applications. There is a PHP
<min>1.4.0b1</min>
</pearinstaller>
<package>
<name>XML_Util</name>
<name>XML_Util2</name>
<channel>pear.php.net</channel>
<min>0.5.2</min>
</package>
Expand Down

0 comments on commit 2bfc467

Please sign in to comment.