function getLocation()
{
if ($this->file !== null) {
$path = $this->file->getAbsolutePath();
} else {
$path = $this->reader->getResource();
}
$this->location = new Location($path, xml_get_current_line_number($this->parser), xml_get_current_column_number($this->parser));
return $this->location;
}