XML / XSLT parsing using PHP

From: Date: Thu, 24 Jan 2002 10:40:49 +0000
Subject: XML / XSLT parsing using PHP
Groups: php.general 
Request: Send a blank email to php-general+get-81852@lists.php.net to get a copy of this message
Hi, We are about to develop a CMS that uses XML and XSLT. The XML files contains some static information (header, footers and common non-dynamic information). We would like to have a XML file that would contain a field like: <MENU> <...> <...> <...> <MENU/> Before the XML file is loaded into the PHP script that uses the xslt_process routine to convert the XML/XSLT files into plain HTML we would like to replace the <MENU> field with come dynamic content (eg. some other variables, etc.) What's the easiest way to do that? SAX or? Furthermore the 'xslt_process' function requires the following parameters: xslt_process (resource xh, string xml, string xsl [, string result [, array arguments [, array parameters]]]) where the XML and XSLT variables are references to files. - The XML file is in our example a variable (eg. $current_xml_file = "xxxxx";) and therefor we cannot use the xslt_process function? Of cause we can store the XML var. in a temporary location and then read the file, but that's an extreamly ugly approach! :) Any ideas? I'm looking forward to your replies :) Yours -- Lasse Laursen <laursen@netgroup.dk> - Systems Developer NetGroup A/S, St. Kongensgade 40H, DK-1264 København K, Denmark Phone: +45 3370 1526 - Fax: +45 3313 0066 - Web: www.netgroup.dk "If it ain't broke, it doesn't have enough features yet." -- laursen "I have not failed. I've just found 10,000 ways that won't work." --Thomas Edison

« previous php.general (#81852) next »