User:Leucosticte/Sandbox

open("smalldump.xml")) { die("Failed to open 'smalldump.xml'"); }

$nodeName = '';

while($reader->read) { if( $reader->nodeType == XMLReader::ELEMENT ) { if ( $reader->name == 'logitem' ) { var_dump( $reader->value ); $value = $reader->value; $log_id = $value['id']; $log_timestamp = $value['timestamp']; echo $log_id; }       }

if($reader->nodeType == XMLReader::END_ELEMENT && $reader->name == 'offer') { $countElements++; }   }    $reader->close;