note 97570 modified in class.domelement by danbrown

From: Date: Mon, 26 Apr 2010 18:51:02 +0000
Subject: note 97570 modified in class.domelement by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-168673@lists.php.net to get a copy of this message
I spent ages figuring out how to get a string representation of a DOMElement (that wasn't the entire DOMDocument), finally I came across this snippet: <?php $string = $domDocument->saveXML($node); ?> where $domDocument is the entire document, and $node is the particular node/element/whatever you want a string XML representation of. --was-- I spent ages figuring out how to get a string representation of a DOMElement (that wasn't the entire DOMDocument), finally I came across this snippet: $string = $domDocument->saveXML($node); where $domDocument is the entire document, and $node is the particular node/element/whatever you want a string XML representation of. http://php.net/manual/en/class.domelement.php

« previous php.notes (#168673) next »