Re: newbie help with php3 and xml

From: Date: Wed, 28 Jun 2000 00:58:45 +0000
Subject: Re: newbie help with php3 and xml
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-708@lists.php.net to get a copy of this message
Hi Andres, I too am interested in WAP. There is an article here that may help you http://www.wirelessdevnet.com Sharon ----- Original Message ----- From: Andres Baravalle <andres@baravalle.co.uk> To: <php-windows@lists.php.net> Sent: Tuesday, June 27, 2000 2:06 PM 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 > >

« previous php.windows (#708) next »