Re: DOMDocument Extension: Output current nodelist
| From: | Johannes Schlüter | Date: | Tue, 29 Jul 2008 22:56:37 +0000 |
| Subject: | Re: DOMDocument Extension: Output current nodelist | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-39446@lists.php.net to get a copy of this message | ||
On Wed, 2008-07-30 at 00:23 +0200, Benjamin Eberlei wrote:
> I recognized at work today that DOMDocument has two function saveHTML and
> saveHTMLFile, but only a save function for the "unfiltered" xml node
> structure to save to a file although libxml provides the functionality to
> export the data to string.
There's save() and saveXML(), where the later does what you're looking
for.
> I created a patch that adds a new method "DOMDocument::ouput" that does
Why "output"? ooutput would mean it prints directly to the output
stream.
Two comments to the patch: (although the function already exists..)
Please use "diff -u" in future, probably even "diff -up", that makes the
diff way better to read (see http://php.net/anoncvs.php for
tips about
configuring cvs to do that automatically)
And please use braces { } on if statements.
johannes