If you have DOMNode in PHP, how can you get the outer xml (i.e. the all of the XML that is inside this element plus the element itself)?
For example, lets say this i
You could try something like:
function getInnerXml(DomNode $node){ $xml = ''; foreach($node->childNodes as $childNode){ $xml .= $node->ownerDocument->saveXml($childNode); } return $xml; }