Пример #1
0
 /**
  * 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));
 }
Пример #2
0
 /**
  * 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));
 }
Пример #3
0
 /**
  * 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));
 }