Example #1
0
 /**
  * Loads a DTD source file and parses string content.
  * @method  loadDtd
  * @param   string   $filename  Path to the DTD file.
  * @return  void
  */
 public function loadDtd($filename = 'xhtml.dtd')
 {
     $this->source = FileUtils::loadFile($filename);
     $this->parse();
     $this->resolveEntities();
 }
Example #2
0
 /**
  * Loads a HTML source file and parses string content.
  * @method  loadDtd
  * @param   string   $filename  Path to the HTML source code file.
  * @return  void
  */
 public function loadHtml($filename = 'site.xhtml')
 {
     $this->source = $this->prepareSource(FileUtils::loadFile($filename));
     $this->topNodes = $this->parseNodes($this->source);
 }