<?php
/*
 * Created on 11.03.2012
 * Oliver Soop(osoop1@ut.ee)
 */
 
  include_once("XMLBaseTagger.php");
 
 class RSSV10Tagger extends XMLBaseTagger {
 	
 	public static $rssv10Tag = "rdf:RDF";
 	public static $channelTag = "channel";
 	public static $itemTag = "item";
 	public static $titleTag = "title";
 	public static $linkTag = "link";
 	public static $descriptionTag = "description";
 	
 	public function __construct() {
		//Tühikonstruktor
 	}
 	
 	/**
 	 * Funktsioon, mis parsib <item> märgendiga objekti Story objektiks
 	 */
 	public static function getStory($domElement) {
 		$title = parent::getTagValue($domElement->getElementsByTagName(RSSBaseTagger::$titleTag));
 		$description = parent::getTagValue($domElement->getElementsByTagName(RSSBaseTagger::$descriptionTag));
 		$link = parent::getTagValue($domElement->getElementsByTagName(RSSBaseTagger::$linkTag));
 		$story = new Story($title, null, $description, $link, null, null, null);
 		return $story;
 	}
 	
 }
?>
