-
- # remove all the <fragment> tags
-
- for ($i = 0; $i < $node->childNodes->length; ++$i) {
- $child = $node->childNodes->item($i);
- if ($child->name != 'temporary-fragment') {
- continue;
- }
- for ($j = 0; $j < $child->childNodes->length; ++$j) {
- $child2 = $child->childNodes->item($j);
- $node->appendChild($child2);
- }
- $node->removeChild($child);
- }