public function rewind()
{
$this->parser = xml_parser_create();
xml_set_object($this->parser, $this);
xml_set_element_handler($this->parser, 'tagStart', 'tagEnd');
xml_set_character_data_handler($this->parser, 'tagContent');
xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0);
xml_parser_set_option($this->parser, XML_OPTION_SKIP_WHITE, 0);
$this->file = fopen($this->filename, 'r');
$this->bufferedRow = array();
$this->currentRowIndex = 0;
$this->currentColumnIndex = 0;
$this->position = 0;
$this->parseRow();
if ($this->hasHeaders) {
$this->columns = array_shift($this->bufferedRow);
$this->parseRow();
}
$this->prepareCurrentRow();
}