Hi.
I'm going to make in auto some tasks that I'm doing manually every
day. I'm uploading big XML file (~20mb) and then I'm using XSLT schema
to transform it to MySQL queries file.
I have used 3rd tools to process XSLT and it takes few seconds to
process my big XML file.
But now I'm moving to PHP so I'm trying to use XSL PHP extension to
apply my XSL file. But... it takes minutes... I allowed 10 minutes
( set_time_limit( 600) ) and it still crashes and says that time
excited.
So please somebody help me to find a way out of the impasse. I can't
move forward now because of slow XSL processing.
The code I'm using is:
*******
// Load the XML source
$xml = new DOMDocument;
$xml->load('extracte d/marketplace_fee d_v1.xml');
$xsl = new DOMDocument;
$xsl->load('cb_marke tplace_feed_com pact.xsl');
// Configure the transformer
$proc = new XSLTProcessor;
$proc->importStyleShe et($xsl); // attach the xsl rules
$sqlCommands = $proc->transformToXML ($xml);
if ($sqlCommands == FALSE)
{
echo "XSLT transformation failed";
exit;
}
if (file_put_conte nts('cbfeed.sql ', $sqlCommands) == FALSE);
{
echo 'Failed to save XSLT transformation result to the file
"cbfeed.sql "';
exit;
}
*******
You can upload files used in my script here:
Any information may help.
Thanks,
Anton
I'm going to make in auto some tasks that I'm doing manually every
day. I'm uploading big XML file (~20mb) and then I'm using XSLT schema
to transform it to MySQL queries file.
I have used 3rd tools to process XSLT and it takes few seconds to
process my big XML file.
But now I'm moving to PHP so I'm trying to use XSL PHP extension to
apply my XSL file. But... it takes minutes... I allowed 10 minutes
( set_time_limit( 600) ) and it still crashes and says that time
excited.
So please somebody help me to find a way out of the impasse. I can't
move forward now because of slow XSL processing.
The code I'm using is:
*******
// Load the XML source
$xml = new DOMDocument;
$xml->load('extracte d/marketplace_fee d_v1.xml');
$xsl = new DOMDocument;
$xsl->load('cb_marke tplace_feed_com pact.xsl');
// Configure the transformer
$proc = new XSLTProcessor;
$proc->importStyleShe et($xsl); // attach the xsl rules
$sqlCommands = $proc->transformToXML ($xml);
if ($sqlCommands == FALSE)
{
echo "XSLT transformation failed";
exit;
}
if (file_put_conte nts('cbfeed.sql ', $sqlCommands) == FALSE);
{
echo 'Failed to save XSLT transformation result to the file
"cbfeed.sql "';
exit;
}
*******
You can upload files used in my script here:
Any information may help.
Thanks,
Anton
Comment