Riku Palomäki wrote:
Hello,
I'm having problems with DOMElement->setAttribute() -method with my php
script. I stripped down the code to this:
----------------------
$doc = new DOMDocument();
$doc->resolveExternals = true;
$doc->loadXml('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><a b="" />');
$root = $doc->getElementsByTagName('a')->item(0);
$root->setAttribute('b', '>');
$root->setAttribute('b', '');
// This will never be executed
echo "done\n";
----------------------
Can you please bug this (no need for the backtrace), so I don't forget
it. I see the problem but will take me a day or two to get around to fix.
As a work around for now you can do:
$root->setAttributeNode(new DOMAttr('b', '>'));
$root->setAttribute('b', '');
Rob
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php