Initial commit
[qml-presentation-made-with-qml:qml-presentation-made-with-qml.git] / flickr / common / RssModel.qml
1 import Qt 4.6
2
3 XmlListModel {
4     property string tags : ""
5
6     source: "http://api.flickr.com/services/feeds/photos_public.gne?"+(tags ? "tags="+tags+"&" : "")+"format=rss2"
7     query: "/rss/channel/item"
8     namespaceDeclarations: "declare namespace media=\"http://search.yahoo.com/mrss/\";"
9
10     XmlRole { name: "title"; query: "title/string()" }
11     XmlRole { name: "imagePath"; query: "media:thumbnail/@url/string()" }
12     XmlRole { name: "url"; query: "media:content/@url/string()" }
13     XmlRole { name: "description"; query: "description/string()" }
14     XmlRole { name: "tags"; query: "media:category/string()" }
15     XmlRole { name: "photoWidth"; query: "media:content/@width/string()" }
16     XmlRole { name: "photoHeight"; query: "media:content/@height/string()" }
17     XmlRole { name: "photoType"; query: "media:content/@type/string()" }
18     XmlRole { name: "photoAuthor"; query: "author/string()" }
19     XmlRole { name: "photoDate"; query: "pubDate/string()" }
20 }