Jump to content

Help with PHP and XML (Convert my ASP Script to PHP)


mjs87

Recommended Posts

Basically I am trying to transform an XML document with XSL on the server. I have looked long and hard at how to do it in PHP and it seems quite complicated, however I have found the following ASP script that works and it seems pretty simple:

 

<%
'Load XML
set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = false
xml.load(Server.MapPath("document.xml"))

'Load XSL
set xsl = Server.CreateObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load(Server.MapPath("planstyle.xsl"))

'Transform file
Response.Write(xml.transformNode(xsl))
%> 

 

The only problem is that I need the transformation to be done in PHP, so could anyone point me in the right direction on how I could get a simple script like the above in php.

 

Many Thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.