Re: [PHP] XML vs Everything Else
Rodrigo Dominguez wrote: I'm writting an application, a control panel for a web site, and it will be great if I can separe data from presentation, I know that I have to work with XML and XSL but I didn't understand how it works. Can you give me a simple example? Let guess that a client request index.php, and I have index.xml for the data, index.xsl for the data transformation and index.php, how it works? From the php manaul: ?php // Allocate a new XSLT processor $xh = xslt_create(); // Process the document if (xslt_process($xh, 'sample.xml', 'sample.xsl', 'result.xml')) { print SUCCESS, sample.xml was transformed by sample.xsl into result.xml; print , result.xml has the following contents\nbr\n; print pre\n; readfile('result.xml'); print /pre\n; } else { print Sorry, sample.xml could not be transformed by sample.xsl into; print result.xml the reason is that . xslt_error($xh) . and the ; print error code is . xslt_errno($xh); } xslt_free($xh); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML vs Everything Else
On Tue, 3 Sep 2002, Geoff Hankerson wrote: Spend some time learning about xml and you won't regret it Sorry for the off topic, but in fact XML is not that hard to learn, it's just custom markup that needs to follow certain rules. The important part is the parser or the program logic to work with the XML documents, IMHO. Sorry again. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML vs Everything Else
Ok, Help me out on this one. As far as i can tell, xml documents store data..pretty much just a dababase. Now please, correct me on anything I say incorrectly...But i just cannot seem to grasp the point of using XML over MySQL. Can anyone direct me to a page with xml in use? Something that can help me grasp what its all about. Thank you, Taylor York DreamStar Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML vs Everything Else
Can anyone direct me to a page with xml in use? Something that can help me grasp what its all about. I didn't understand xml at all until I started using it . I asked pretty much the same question as you (what is it good for?). Now I will almost always use xml in any app I work on. One application that is simply wonderful is xsl transformations. This allows you to take xml and transform it into html, wml, pdf, rtf , etc... What this ultimately means to me is seperation of presentation from logic and data which makes for a very flexible and easy to maintain application. I have made a php class to make a database query into xml in the form of: recordfieldname value /fieldname/record Now stuff I used to do that took a whole page to code nows uses about 5 lines. This is a real world benefit for me. Spend some time learning about xml and you won't regret it -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML vs Everything Else
I'm writting an application, a control panel for a web site, and it will be great if I can separe data from presentation, I know that I have to work with XML and XSL but I didn't understand how it works. Can you give me a simple example? Let guess that a client request index.php, and I have index.xml for the data, index.xsl for the data transformation and index.php, how it works? Geoff Hankerson [EMAIL PROTECTED] escribió en el mensaje [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Can anyone direct me to a page with xml in use? Something that can help me grasp what its all about. I didn't understand xml at all until I started using it . I asked pretty much the same question as you (what is it good for?). Now I will almost always use xml in any app I work on. One application that is simply wonderful is xsl transformations. This allows you to take xml and transform it into html, wml, pdf, rtf , etc... What this ultimately means to me is seperation of presentation from logic and data which makes for a very flexible and easy to maintain application. I have made a php class to make a database query into xml in the form of: recordfieldname value /fieldname/record Now stuff I used to do that took a whole page to code nows uses about 5 lines. This is a real world benefit for me. Spend some time learning about xml and you won't regret it -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php