You are here: Re: XML create with PHP 5 help « PHP Programming Language « IT news, forums, messages
Re: XML create with PHP 5 help

Posted by Alistair Baillie SS2002 on 05/17/05 16:24

You just echo it out to the browser like that, and send the XML content
header.

(Or save it into a variable, for storing into a file)

eg:

<?php
header("Content-type: text/xml");
echo "
<response>\n
<data>\n
<parts>\n
<part>\n
<number>bla</number>\n
</part>\n
</parts>\n
</data>\n
</response>";
?>


"Gary Quiring" <gquiring@msn.com> wrote in message
news:5epj81dn4lb63elmhs5pqt6ao1lqjlno0c@4ax.com...
>I need to create an XML string using PHP5. The examples I have followed
>seem to
> be using out dated libary calls. I tried new_xmldoc() and new
> DomDocument.
> Both get undefined errors. How do I create an XML string where it will
> look
> something like this:
>
> <response>
> <data>
> <parts>
> <part>
> <number>bla</number>
> <price>9999</price>
> <uom>EA</uom>
> <locations>
> <location>
> <id>bla</id>
> <qty>9999</qty>
> </location>
> </locations>
> </part>
> </parts>
> </data>
> </response>
>
> Thanks
> Gary Quiring
>

 

Navigation:

[Reply to this 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

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