/** * Find the feed description. * * @param SimpleXMLElement $xml Feed xml * @param \PicoFeed\Parser\Feed $feed Feed object */ public function findFeedDescription(SimpleXMLElement $xml, Feed $feed) { $value = XmlParser::getXPathResult($xml, 'channel/description'); $feed->setDescription(XmlParser::getValue($value)); }
/** * Find the feed description. * * @param SimpleXMLElement $xml Feed xml * @param \PicoFeed\Parser\Feed $feed Feed object */ public function findFeedDescription(SimpleXMLElement $xml, Feed $feed) { $description = XmlParser::getXPathResult($xml, 'rss:channel/rss:description', $this->namespaces) ?: XmlParser::getXPathResult($xml, 'channel/description') ?: $xml->channel->description; $feed->setDescription(XmlParser::getValue($description)); }
/** * Find the feed description. * * @param SimpleXMLElement $xml Feed xml * @param \PicoFeed\Parser\Feed $feed Feed object */ public function findFeedDescription(SimpleXMLElement $xml, Feed $feed) { $description = XmlParser::getXPathResult($xml, 'atom:subtitle', $this->namespaces) ?: XmlParser::getXPathResult($xml, 'subtitle'); $feed->setDescription(XmlParser::getValue($description)); }