note 51447 added to function.xslt-process
| From: | csarvenatgmaildotcom at osu1 dot php dot net | Date: | Thu, 31 Mar 2005 03:17:18 +0000 |
| Subject: | note 51447 added to function.xslt-process | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-87227@lists.php.net to get a copy of this message | ||
I found using the output buffer to be efficient, when dealing with php scripts, with xml data.
<?
$xh = xslt_create();
ob_start();
include('main.php'); //main.php contains php and xml
$xml_file = ob_get_contents();
ob_end_clean();
$arguments = array('/_xml' => $xml_file);
$result = xslt_process($xh, 'arg:/_xml', 'index.xsl', NULL, $arguments);
if (!$result) echo 'XSLT processing error: ' .xslt_error($xh) ;
else echo $result;
xslt_free($xh);
?>
----
Manual Page -- http://www.php.net/manual/en/function.xslt-process.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+51447
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51447&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51447&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51447&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51447&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51447&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+51447&report=yes
Search -- http://master.php.net/manage/user-notes.php