$attrs[] =
$name;
continue;
} // Standard attribute text
$attrs[] =
$name . '="' .
$attr->value . '"';
} $text .= ' ' .
implode(' ',
$attrs);
} $text .= '>';
$fragment->
appendChild(new DOMText($text));
} $number =
$element->childNodes->length;
for ($i =
$number;
$i > 0;
$i--
) { $child =
$element->childNodes->
item(0
);
$fragment->
appendChild($child);
} if (!
in_array($tag, array
('script', 'style'
))) {