コード例 #1
0
ファイル: DtdParser.php プロジェクト: simphotonics/dom
 /**
  * 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();
 }
コード例 #2
0
ファイル: HtmlParser.php プロジェクト: simphotonics/dom
 /**
  * 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);
 }