Reply to Re: php and XML question

Your name:

Reply:


Posted by David Haynes on 11/18/19 11:43

amagondes@hotmail.com wrote:
> Like Jon said just print the xml. Here is an example:
>
> <?php
> header("Content-Type: text/xml");
>
> echo "<?xml version=\"1.0\" ?>\n";
>
> print "<response>\n";
> print " <test>This is a test</test>\n";
> print "</response>\n";
>
> ?>
>
> That way you can populate the content on the fly from a db or whatever.
>

This is OK unless you have a whack of XML to print. Then I would create
a library that lets you instantiate an XML document, add elements and
attributes to it, and finally print it.

It's easy to do. The last time I did one it took about a day to get it
all together with test scripts etc.

-david-

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация