Beispiel #1
0
 public static function importString($string)
 {
     $xml = simplexml_load_string($string);
     if ($xml === false) {
         return;
     }
     if (isset($xml->channel)) {
         // RSS
         return RSSFeed::import($xml->channel[0]);
     }
     if (isset($xml->entry)) {
         // Atom
         return AtomFeed::import($xml);
     }
 }