Hi I wanted to know how to append an XML tag in a newly created Appended Child Node?
Here is what I have,
$newNode = $xml->createDocumentFragment();
$reCreateOldNode = $xml->createElement("myNewChild");
$newNode->appendChild($reCreateOldNode); // This is Newly Appended Child
while ($node->firstChild) {
$match->nodeValue = "";
$newNode->appendChild($node->firstChild);
$newNode->appendXML($actionOutput); // I want to Append the XML to $newNode->myNewChild
}
$node->parentNode->replaceChild($newNode, $node);
This is the newly created Child,
$newNode->appendChild($reCreateOldNode);
And I want to Append the XML that I have created to $newNode->myNewChild
not on $newNode
directly.