Re: [PHP] Handling XML output in a slim way

2004-09-02 Thread Markus Fischer
Manuel Lemos wrote:
You may want to try this XML writer class. It lets you just add tags and 
data and then it outputs the data properly encoded and nicely indented 
according to your specifications. It does not requere any special 
extension.
Probably exactly what I want, thanks.
- Markus
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Handling XML output in a slim way

2004-09-02 Thread Manuel Lemos
Hello,
On 09/02/2004 06:25 AM, Markus Fischer wrote:
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.

You are right, it works. But I'm not satisified and up until now I've 
been dealing with very simple XML documents, but they're getting more 
and more complexer and I'm spending more and more time getting complex 
XML output right with the string-concact method.
You may want to try this XML writer class. It lets you just add tags and 
data and then it outputs the data properly encoded and nicely indented 
according to your specifications. It does not requere any special extension.

http://www.phpclasses.org/xmlwriter
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Handling XML output in a slim way

2004-09-02 Thread Markus Fischer
Raditha Dissanayake wrote:
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.
You are right, it works. But I'm not satisified and up until now I've 
been dealing with very simple XML documents, but they're getting more 
and more complexer and I'm spending more and more time getting complex 
XML output right with the string-concact method.

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


Re: [PHP] Handling XML output in a slim way

2004-09-01 Thread raditha dissanayake
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('%s', 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