RE: [PHP-WIN] newbie help with php3 and xml
| From: | Brian Paulson | Date: | Tue, 27 Jun 2000 21:59:05 +0000 |
| Subject: | RE: [PHP-WIN] newbie help with php3 and xml | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-711@lists.php.net to get a copy of this message | ||
Andres,
In order for the browser to disply it as XML the extenstion of the page has
to be XML(results.xml). I spent about 4 hours one day going nuts over that.
hope that helps.
----------------------
Brian Paulson
Sr. Web Developer
1-800-279-6397 X207
bpaulson@chieftain.com
----------------------
> -----Original Message-----
> From: Andres Baravalle [mailto:andres@baravalle.co.uk]
> Sent: Tuesday, June 27, 2000 3:07 PM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] newbie help with php3 and xml
>
>
> Hi,
> I have a litte database in mysql that is callen by a php script. It looks
> well (I'm using php since 3/4 weeks...) and it does exaclty what I want.
> But now I need (for my degree...) to have an output in xml, to be
> trasformed with xsl (the database should be accessed both by computer and
> by cellphones).
> I do not want to make a separate wml file, but I'd like to have an unique
> xml file.
>
> I have not understood exactly how to install expat :-) and for what it is
> for. I have read the php documentation about it but I have
> understood nothing.
>
> What I see is a blank page; when I view the source, I see a xml
> code, that
> should be well formed. If I save it and I put it in a folder with my
> stylesheet, it works.
> You can see it in www.vitaveska.com/baravalle/principalev.php3.
> The working version, with html output, is at
> www.vitaveska.com/baravalle/principale.php3
> My internet web site perhaps does not have xml enabled in php,
> but I'm not
> sure.
>
> That is the code i used:
>
> echo "<?xml version='1.0' encoding='ISO-8859-1' ?>";
> echo "<?xml:stylesheet type='text/xsl' href='stile1.xsl'
> ?>";
> echo "<esami>";
> echo "<title><primo>Orari di ricevimento</primo>\n";
> while ($myrow = mysql_fetch_row($risultato_ricevimento))
> {
> echo "<dati><dato1>";
> printf("%s, %s</dato1>\n", $myrow[0], $myrow[1]);
> echo "<dato2>";
> printf("%s</dato2>\n", $myrow[2]);
> echo "<dato3>";
> printf("codice: %s</dato3>\n", $myrow[3]);
> echo "<dato4>";
> printf("%s</dato4>\n", $myrow[4]);
> echo "<dato5>";
> printf("</dato5>\n");
> echo "<dato6>";
> printf("%s</dato6>\n</dati>\n", $myrow[5]);
> }
> }
>
> If you also know any deep documentation (even books) about wml,
> xml and php
> it would be very apreciated.
> Thanks in advance,
> Andres Baravalle
>
> ____________
>
> Andres Baravalle
> mailto:andres@baravalle.co.uk
> http://www.baravalle.co.uk
>
> tel: +39 015 20511
> cell: +39 0328 6754092
> fax: +39 02 700431996
> ____________
>
> Ogni popolo deve scrivere la propria storia, e i
> popoli sconfitti hanno il dovere di opporre la
> loro storia a quella che scriveranno i
> vincitori.
> Paco Ignacio Taibo I
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>