Source for file FileHTML.php
Documentation is available at FileHTML.php
* Load FluentDOM from local HTML file
* @version $Id: FileHTML.php 431 2010-03-29 20:42:04Z subjective $
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
* @copyright Copyright (c) 2009 Bastian Feder, Thomas Weinert
require_once(dirname(__FILE__ ). '/../Loader.php');
* Load FluentDOM from HTML file
* load DOMDocument from local HTML file
* @param string $source filename
* @param string $contentType
* @return DOMDocument|FALSE
public function load($source, $contentType) {
FALSE === strpos($source, '<') &&
$contentType == 'text/html') {
throw new InvalidArgumentException('File not found: '. $source);
$dom = new DOMDocument();
$dom->loadHTMLFile($source);
|