Hi All,
My webhost has decided he wants to upgrade his production server to PHP5. Problem is I know Sablotron does not work in PHP5 and I need to migrate from 4 to 5 some scripts that process XML files.
1) The one file is for viewing XML articles with an XSLT. In it I use the following:
$xp = xslt_create();
$result = xslt_process($xp, $pagetodo, 'stylesheet.xsl');
echo $result;
xslt_free($xp);
What would be the PHP equivelent of this?
2) The second uses a function called GetXMLTree().
In that function there is the following:
$parser = xml_parser_create ('ISO-8859-1');
xml_parser_set_option ($parser, XML_OPTION_SKIP_WHITE, 1);
xml_parser_set_option ($parser, XML_OPTION_CASE_FOLDING, 0);
if (!xml_parse_into_struct ($parser, $xmldata, $vals, $index)) {
$xmlreaderror = true;
echo "error";
}
xml_parser_free ($parser);
THe rest of the function is just dealing with arrays and not an issue. But I need help with taking the Sablotron XML items and putting them into PHP5.
3) any good, simple resources for XML parsing in PHP5 for reference?
TIA
Phil