Betr: XML->HTML using PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux