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 need a DOMDocument:
// If you don't have a document already:
$doc = new DOMDocument('1.0', 'UTF-8');
echo $doc->saveXML($node); // where $node is your DOMNode
Check DOMDocument::saveXML in the docs for more info.
When you pass a DOMNode to saveXML() you get back only the contents of that node not the whole document.