|
@@ 1520-1527 (lines=8) @@
|
| 1517 |
|
|
| 1518 |
|
if ($replace) {
|
| 1519 |
|
switch ($this->type) {
|
| 1520 |
|
case (self::Element):
|
| 1521 |
|
if ($this->rawNode->nodeType == XML_DOCUMENT_NODE) {
|
| 1522 |
|
return $this->encdoc;
|
| 1523 |
|
}
|
| 1524 |
|
$importEnc = $this->rawNode->ownerDocument->importNode($this->encdoc->documentElement, TRUE);
|
| 1525 |
|
$this->rawNode->parentNode->replaceChild($importEnc, $this->rawNode);
|
| 1526 |
|
return $importEnc;
|
| 1527 |
|
break;
|
| 1528 |
|
case (self::Content):
|
| 1529 |
|
$importEnc = $this->rawNode->ownerDocument->importNode($this->encdoc->documentElement, TRUE);
|
| 1530 |
|
while($this->rawNode->firstChild) {
|
|
@@ 1528-1535 (lines=8) @@
|
| 1525 |
|
$this->rawNode->parentNode->replaceChild($importEnc, $this->rawNode);
|
| 1526 |
|
return $importEnc;
|
| 1527 |
|
break;
|
| 1528 |
|
case (self::Content):
|
| 1529 |
|
$importEnc = $this->rawNode->ownerDocument->importNode($this->encdoc->documentElement, TRUE);
|
| 1530 |
|
while($this->rawNode->firstChild) {
|
| 1531 |
|
$this->rawNode->removeChild($this->rawNode->firstChild);
|
| 1532 |
|
}
|
| 1533 |
|
$this->rawNode->appendChild($importEnc);
|
| 1534 |
|
return $importEnc;
|
| 1535 |
|
break;
|
| 1536 |
|
}
|
| 1537 |
|
} else {
|
| 1538 |
|
return $this->encdoc->documentElement;
|