function XML_Template_process($node, $obj, $clean = 1)
{
if (is_a($obj, 'DOMNode')) { # overwrite
- while ($node->childeNodes->length > 0) {
+ while ($node->childNodes->length > 0) {
$child = $node->childNodes->item(0);
$node->removeChild($child);
}
return $array;
}
-# Ideally, this would be "return $obj->clone_node(true)". But surprise, surprise,
-# PHP is buggy (at least both PHP4 and PHP5); it removes the prefix information
-# from all attributes during a clone. IOW, we'll have to clone evverything
-# ourselves.
+# Ideally, this would be "return $obj->clone_node(true)". But surprise,
+# surprise, PHP is buggy; it does not preserve the prefix information on
+# attributes properly during a clone. (PHP4 and PHP5 are broken in different
+# ways here...) IOW, we'll have to clone everything ourselves.
function own_clone_node($node, $doc)
{
// we only need these two