Thats embarassing. I missed saveXML. :)

Regarding the ifs, that is mostly copy paste. the original functions
saveHtml and save don't have braces currently.

Regarding naming: Output, because of the naming scheme "saveHtml <-> 
saveHtmlFile" and "save" (represeting what saveHtmlFile did) i had to come up 
with another name and this seemed reasonable. Although your comment is right, 
it suggests directly printing to output buffer.

Thanks for the tipps on "diff", i have never used it before.

Benjamin

On Wednesday 30 July 2008 00:56:37 Johannes Schlüter wrote:
> 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



-- 
Benjamin Eberlei
http://www.beberlei.de

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to