Source for file StringHTML.php
Documentation is available at StringHTML.php
* Load FluentDOM from HTML string
* @version $Id: StringHTML.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 string
* load DOMDocument from html string
* @param string $source html string
* @param string $contentType
* @return DOMDocument|FALSE
public function load($source, $contentType) {
FALSE !== strpos($source, '<') &&
$contentType == 'text/html') {
$dom = new DOMDocument();
|