Go4Expert

Go4Expert (http://www.go4expert.com/)
-   PHP (http://www.go4expert.com/forums/php/)
-   -   PHP and XML (http://www.go4expert.com/forums/php-and-xml-t4280/)

shabbir 12May2007 12:43

PHP and XML
 
I would like to know if there is something very simple where I can get the data from the XML file. What I am looking for is I have some data in the XML file and would like that to be read and display in pages.

Also I have been reading this days about the XML and XSLT file but I am not sure how xslt file displays all into the browser from the XML

pete_bisby 2Dec2007 22:52

Re: PHP and XML
 
XML is the data, while XSLT is the stylesheet or how the XML information should be displayed. You can define the XML as either data or as an input form - you don't actually need PHP to decipher the XML if you have a well-defined XSLT file.

Have a look at the following links for XML/XSLT definitions:
http://www.w3schools.com/xsl/xsl_editxml.asp
http://www.w3schools.com/xsl/xsl_transformation.asp

You can, however, use PHP to parse an XML file and display the XML information that way. Look at the following areas on PHP.net for functions. Just ensure that the XML/XSLT extensions are included in your installation:
http://www.php.net/manual/en/ref.xml.php
http://www.php.net/manual/en/ref.xslt.php


All times are GMT +5.5. The time now is 09:30.