xml/xslt
[email protected] (Kevin Waterson)
| Newsgroups | php.xml.dev |
|---|---|
| Organization | Oceania |
| Message-ID | <[email protected]> |
In a previous life I used to do something like this:
$arguments = array('/_xml' => $xmlstring);
$xsltproc = xslt_create();
xslt_set_encoding ($xsltproc, "ISO-8859-1");
$html = xslt_process($xsltproc,'arg:/_xml',"myXSL.xsl",NULL,$arguments);
if (!$html) die('XSLT processing error: '.xslt_error($xsltproc));
xslt_free($xsltproc);
echo $html;
I am having some problems with the new way, sorta like this:
$proc = new xsltprocessor();
how do I tell the $proc object the xsl file to use?
and set the encoding?
$dom->loadxml('<?xml version="1.0" encoding="UTF-8"?>$xmlstring');
or something....
Kind regards
Kevin
--
______
(_____ \
_____) ) ____ ____ ____ ____
| ____/ / _ ) / _ | / ___) / _ )
| | ( (/ / ( ( | |( (___ ( (/ /
|_| \____) \_||_| \____) \____)
Kevin Waterson
Port Macquarie, Australia