Re: DOMDocument->saveXML()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Perhaps you missed my reply.

http://www.php.net/manual/en/function.dom-domdocument-savexml.php

The first parameter to DOMDocument->saveXML() is described:

"Use this parameter to output only a specific node without XML declaration rather than the entire document."

If you pass the root node then you get the entire document without the XML declaration.

That's both elegant and built-in.

Tom.

Chris Boget wrote:
Would it be possible to point to the relevant page in the
documentation that discusses how to do this?
If there is nothing builtin to do it, how tricky could it be to strip
off the first line after you saved it?...

Not tricky at all.

"Crude, but effective, Captain" -- Spock

Exactly.  I was just hoping for something a bit more elegant.
Hopefully using something that was built in to DOMDocument.
Oh, well.

thnx,
Chris

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux