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