Development XML (transform) in PHP 4?

Discussion in 'Software' started by jezmck, 14 Sep 2005.

  1. jezmck

    jezmck Minimodder

    Joined:
    25 Sep 2003
    Posts:
    4,456
    Likes Received:
    36
    Hi guys,
    my host has refused to upgrade to PHP 5, and hence I can't use its included XML processing.
    [bizarrely, the version jumped from 4.3.11 to 4.4.0 for a short while between me asking and them saying no]

    Is there anyway I can add the support through files?

    Or any other way I can do a transform through PHP?

    TIA,
    j
     
    Last edited: 14 Sep 2005
  2. Hwulex

    Hwulex What's a Dremel?

    Joined:
    1 Feb 2002
    Posts:
    4,007
    Likes Received:
    1
    You mean an XML transformation using XSL?
     
  3. jezmck

    jezmck Minimodder

    Joined:
    25 Sep 2003
    Posts:
    4,456
    Likes Received:
    36
    yup! :)
    I tried it on my own server (which does has PHP5) and it still didn't work:

    PHP:
    <?php
    fopen
    ('http://elsewhere.com/.../pricegraphxmldata.xml''r');

    $xml = new DOMDocument;
    $xml->load('http://elsewhere.com/.../pricegraphxmldata.xml');

    $xsl = new DOMDocument;
    $xsl->load('carbonPricesTransformJ.xslt');

    // Configure the transformer
    $proc = new XSLTProcessor;
    $proc->importStyleSheet($xsl); // attach the xsl rules

    echo $proc->transformToXML($xml);

    ?>
    gives the error:
    Fatal error: Class 'XSLTProcessor' not found in ---- on line 20

    So I guess I still need to import the right bit or something.

    PS - this is currently at ---
     
    Last edited: 6 May 2010
  4. simon w

    simon w What's a Dremel?

    Joined:
    3 Nov 2003
    Posts:
    1,302
    Likes Received:
    0

Share This Page