You are here

private function FeedsCrawler::parseXPath in Feeds Crawler 6.2

Same name and namespace in other branches
  1. 7 FeedsCrawler.inc \FeedsCrawler::parseXPath()
1 call to FeedsCrawler::parseXPath()
FeedsCrawler::fetch in ./FeedsCrawler.inc
Implements FeedsFetcher::fetch().

File

./FeedsCrawler.inc, line 91
Home of the FeedsCrawler.

Class

FeedsCrawler
Fetches data via HTTP.

Code

private function parseXPath($result, $source_config) {
  $dom = new DOMDocument();
  $dom
    ->loadHTML($result
    ->getRaw());
  $xml = simplexml_import_dom($dom);
  unset($dom);
  $href = $xml
    ->xpath($source_config['crawler']['xpath']);
  unset($xml);
  return $this
    ->parseHref($href, $source_config['source']);
}