PHP and XML

Discussion in 'PHP' started by shabbir, May 12, 2007.

  1. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    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
     
  2. pete_bisby

    pete_bisby New Member

    Joined:
    Nov 11, 2007
    Messages:
    48
    Likes Received:
    2
    Trophy Points:
    0
    Occupation:
    Software Developer/Analyst, PB
    Location:
    Manchester, England
    Home Page:
    http://www.pbworld.co.uk
    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
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice