Re: create xml document with PHP
| From: | Oliver Cronk | Date: | Fri, 01 Feb 2002 04:01:01 +0000 |
| Subject: | Re: create xml document with PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-83059@lists.php.net to get a copy of this message | ||
XML isn't always going to a browser remember, it could be another
application on another server that wants an XML doc to sync something or
such like. And that sort of application is what PHP needs (more
middleware-ish to compete with Java etc), as I feel that PHP is capable of
much more than just web page -> user scenarios.
Don't mean to be patronising however!
Oliver Cronk
"Manuel Lemos" <mlemos@acm.org> wrote in message
news:<3C5703F4.46616BF1@acm.org>...
> Hello,
>
> Rodrigo Peres wrote:
> >
> > Hi list,
> >
> > I'm new to the xml world, and I need to create a page with data
retrieved
> > from my database using PHP. The process is the same of create an html
page??
> > I mean I can use echo to output the xml tags and values?? Since this
page
> > will be dinamically generated what kind of headers I need to use to this
> > page become an xml???
>
> I don't think serving XML directly to the browser is a good idea because
> many browsers would not render it.
>
>
> > I saw many docs in web but all about parse an xml, but not in how to
build
> > one.
>
> This PHP class does exactly what you need. See the documentation for a
> typical example.
>
> Regards,
> Manuel Lemos
>