Markus Fischer wrote:

Hi,

up until now, when outputing XML I've been constructing the output as a continous string-soup in such ways like

[...]
$xml .= printf('<item name="%s">%s</item>', makeXmlSave($name), makexmlSave($contentOfItem));
[...]


makeXmlSave() makes sure that quotes, ampersand, < and > are properly escaped with their entity reference. However I was thinking if it wasn't possible to e.g. generated a a complete DOM tree first and then just having this tree being dumped as XML.

If it's not broken don't fix it. If what you are doing right now works stick with it because it consumes very little memory or CPU compared to DOM functions.



--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/         | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.

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



Reply via email to