I used the function posted by "joe" but the following works to me for get the innerXML
<?php
$itemLeido = $XMLRespuesta->getElementsByTagName("articulos");
foreach($itemLeido as $node) {
echo($node->ownerDocument->saveXML($node));
}
?>
DOMDocument->saveXML()(no version information, might be only in CVS) DOMDocument->saveXML() -- Dumps the internal XML tree back into a string说明class DOMDocument {string saveXML ( [DOMNode node [, integer options]] ) } Creates an XML document from the DOM representation. This function is usually called after building a new dom document from scratch as in the example below. 参数
范例
27-Mar-2006 08:20
I used the function posted by "joe" but the following works to me for get the innerXML
doc dot php dot net at webdevelopers dot cz
29-Sep-2005 06:25
saveXML() does not produce valid XML in case that the DOM was build using loadHTML() method.
mswiercz at mwerk dot com
10-Sep-2004 06:43
Quick tip to minimize memory when generating documents with DOM.
padys at tlen dot pl
05-Aug-2004 10:36
When you save whole document: | ||