Excuse me if you saw this already in the newbie section, but perhaps it maybe better if posted in here.....
Hi, I am a PHP newbie and would like to parse xml files on my site
I have managed to do the following successfully
<?
// Xml and XSL files
$xml_file = "myfile.xml";
$xsl_file = "myfile.xsl";
// Allocate a new XSLT processor
$xh = xslt_create();
$fileBase = 'file://' . getcwd () . '/';
xslt_set_base ( $xh, $fileBase );
// Process the document
$result = xslt_process($xh, $xml_file, $xsl_file);
if (!$result) {
// Something croaked. Show the error
echo 'XSLT processing error: ' .xslt_error($xh) ;
}
else {
// Output the resulting HTML
echo $result;
}
// Destroy the XSLT processor
xslt_free($xh);
?>
But now I would like to know how to parse none local xml files ? i.e.
$xml_file = "http://somewebsite/theirxml.xml";
I know it is not the baove because I get an invalid token error :-/
Could someone please point me in the right direction ?
Thanks
Scott