Re: Re: About Incorporating MySQL and XML/XSLT/PHP

From: Date: Mon, 09 Jul 2007 20:53:59 +0000
Subject: Re: Re: About Incorporating MySQL and XML/XSLT/PHP
References: 1 2 3 4 5 6 7 8  Groups: php.general 
Request: Send a blank email to php-general+get-258520@lists.php.net to get a copy of this message
I said,
Kevin
my bad; meant to say Kelvin.. -nathan On 7/9/07, Nathan Nobbe <quickshiftin@gmail.com> wrote:
Kevin, would you mind sending the particular url w/ the content you are referring to? also, data doesnt necessarily need to go through xml on its way back to the database. consider a web form for instance which might submit data to your application via HTTP POST. in that case you could simply process the data in a familiar way and insert / update or whatever, the database as appropriate. aside from that if you wanted to send XML elements to the database you could do so in one of several ways. the XML could be stored natively of course, but i think what youre asking about is getting the contents of a particular tag, say, and insert that into a particular field in a table. to accomplish this use SimpleXML or DOM to parse the XML and traverse to the node whose data you mean to insert (or update or whatever) into the database; store it in a variable and use it in a query at a later point in the code. -nathan On 7/9/07, Kelvin Park <kelvinpark86@gmail.com> wrote: One of his tutorials explained how to transfer MySQL data to XML, however obviously the data is not always static, it needs to be changed sending the data back to MySQL through XML. Do you know how to send XML elements back in to MySQL database? Thanks! On 7/9/07, Nathan Nobbe <quickshiftin@gmail.com > wrote:
i havent had time to fully explore the material from Tony yet, but so far ive been building XML entirely in memory rather than reading in a complete file, parsing it and placing data at certain points. one thing i would like to explore is either DTDs or XMLSchema to validate the XML against. in that case even w/ the approach i currently take there would still be files on disk. as long as said XML files have practical permissions i dont think having them on disc is a great security risk. -nathan On 7/9/07, Kelvin Park < kelvinpark86@gmail.com> wrote:
Since XML is just a text document, wouldn't it raise security issues if all data was transferred to XML files? On 7/9/07, Kelvin Park < kelvinpark86@gmail.com> wrote:
absolutely!, thanks On 7/9/07, Nathan Nobbe <quickshiftin@gmail.com > wrote:
Tony, this material looks quite excellent; thanks for sharing. -nathan On 7/9/07, Tony Marston < tony@marston-home.demon.co.uk> wrote:
Try these for size: http://www.tonymarston.net/php-mysql/domxml.html and http://www.tonymarston.net/php-mysql/sablotron.html http://www.tonymarston.net/php-mysql/dom.html and http://www.tonymarston.net/php-mysql/xsl.html There is also a sample application available at http://www.tonymarston.net/php-mysql/sample-application.html which
you can
download with all the necessary code. -- Tony Marston http://www.tonymarston.net http://www.radicore.org ""Kelvin Park"" <kelvinpark86@gmail.com> wrote in message
news:d1ace2e20707090141p63050dbfy3be12208f89af53@mail.gmail.com...
I'm using XSLT to make a website template and XML to
describe the data
on
my website. Do I parse the data from MySQL to XML in order to
apply styles
and display them as XHTML with XSLT? I would have to use PHP to parse XML, however I was unclear
on how to
pass
MySQL data to XML in order for it do be displayed through
XSLT template.
Do you know a good reference (website, book, article) for
the most
correct
way to display MySQL data with XML/XSLT/PHP?
-- PHP General Mailing List ( http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#258520) next »