Forums / Developer / xml file
Didier Kalulambi
Wednesday 17 November 2010 7:35:03 am
I want to read an xml file in my cron jobs. here is my php file:
<?php //include_once( 'kernel/classes/datatypes/ezxmltext/handlers/input/ezsimplifiedxmlinput.php' ); function readXML( $fichier, $row ) { $xml = simplexml_load_file( $fichier ); $tables = $xml[$row]; foreach( $xml->ROWDATA[0] as $table ) { $dd[]=$table[0]['SIRET']; $kkd[]=$table[0]['LIB_SOUSCLASSE']; } foreach($dd as $kk){ echo $kk; echo '<br />'; } foreach($kkd as $kal){ echo $kal;echo '<br />'; } } $mod=date("d m Y ", filemtime("test1.xml")); echo $mod; echo '<br />'; readXML( "test1.xml", "ROWDATA" );?>
i need help to the "simplexml_load_file" to load my test1.xml thank you.