Jump to content

Coverting to PHP


StirCrazy

Recommended Posts

This is probably the wrong place to post this but I'm hoping someone who knows PHP here also knows ASP/IIS


Is there a way of doing this:-
[code]Dim xmlrequest
Set xmlrequest = Server.CreateObject("MSXML2.ServerXMLHTTP")
xmlrequest.open "GET", strQuery, False
xmlrequest.setRequestHeader "Content-type", "text/xml"
xmlrequest.send

xml.loadxml(xmlrequest.responseText)
xsl.load(Server.MapPath(".") & "\results.xsl")[/code]


...in PHP?


Regards,
S.C>
Link to comment
Share on other sites

u loading XML? and then converting it via XSL to another XML doc?


$xml = new DOMDocument;
$xml->load('collection.xml');

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

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

//this might be needed... header("Content-Type: text/xml");
echo $proc->transformToXML($xml);
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.