note 97570 added to class.domelement
| From: | adam dot clements at gmail dot com | Date: | Mon, 26 Apr 2010 18:29:55 +0000 |
| Subject: | note 97570 added to class.domelement | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-168672@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:
$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.
----
Server IP: 78.110.173.36
Probable Submitter: 188.222.61.122
----
Manual Page -- http://www.php.net/manual/en/class.domelement.php
Edit -- https://master.php.net/note/edit/97570
Del: integrated -- https://master.php.net/note/delete/97570/integrated
Del: useless -- https://master.php.net/note/delete/97570/useless
Del: bad code -- https://master.php.net/note/delete/97570/bad+code
Del: spam -- https://master.php.net/note/delete/97570/spam
Del: non-english -- https://master.php.net/note/delete/97570/non-english
Del: in docs -- https://master.php.net/note/delete/97570/in+docs
Del: other reasons-- https://master.php.net/note/delete/97570
Reject -- https://master.php.net/note/reject/97570
Search -- https://master.php.net/manage/user-notes.php