Betr: XML->HTML using PHP
| From: | Thijs Koerselman | Date: | Tue, 30 Sep 2003 07:28:26 +0000 |
| Subject: | Betr: XML->HTML using PHP | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-21624@lists.php.net to get a copy of this message | ||
Hi,
I'm new to this list and php so probably this is going to be a "newbie" question.
I consider myself an intermediate C/C++ programmer and I know quite some
things about HTML and XML.
A while ago I decided to make myself a flexible website using XML, and I
bumped into a cool tutorial in the MSDN about DXML. It is about generating
a dynamic menu bar, reading a TOC from an XML-file and combining CSS/XSL/Jscript
to generate HTML using server-side scripting.
My problem is: It uses ASP to generate HTML from the XML/XSL files, but (ofcourse)
I want to use PHP instead. I searched the in DOMXML for the same functions
but I just can't figure it out. Can someone please explain to me how to convert
this simple code into PHP? Actually I'm only interested in the last line.
// sXml and sXsl are variables containing the filenames
var oXmlDoc = Server.CreateObject("MICROSOFT.XMLDOM");
var oXslDoc = Server.CreateObject("MICROSOFT.XMLDOM");
oXmlDoc.async = false;
oXslDoc.async = false;
oXmlDoc.load(Server.MapPath(sXml));
oXslDoc.load(Server.MapPath(sXsl));
Response.Write(oXmlDoc.transformNode(oXslDoc));
Thanx a lot,
Cheers T