You are here

protected function FeedsExQueryPathHtml::prepareDocument in Feeds extensible parsers 7

Same name and namespace in other branches
  1. 7.2 src/FeedsExQueryPathHtml.inc \FeedsExQueryPathHtml::prepareDocument()

Prepares the DOM document.

Parameters

FeedsSource $source: The feed source.

FeedsFetcherResult $fetcher_result: The fetcher result.

Return value

DOMDocument The DOM document.

Overrides FeedsExXml::prepareDocument

File

src/FeedsExQueryPathHtml.inc, line 36
Contains FeedsExQueryPathHtml.

Class

FeedsExQueryPathHtml
Parses HTML documents with QueryPath.

Code

protected function prepareDocument(FeedsSource $source, FeedsFetcherResult $fetcher_result) {
  $raw = $this
    ->prepareRaw($fetcher_result);
  if ($this->config['use_tidy'] && extension_loaded('tidy')) {
    $raw = tidy_repair_string($raw, $this
      ->getTidyConfig(), 'utf8');
  }
  return FeedsExXmlUtility::createHtmlDocument($raw);
}