Exemplo n.º 1
0
 /**
  * Returns the location object of the current parsed element. It describes
  * the location of the element within the XML file (line, char)
  *
  * @return object  the location of the current parser
  * @access public
  */
 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;
 }
Exemplo n.º 2
0
 function getResource()
 {
     return $this->in->getResource();
 }