summaryrefslogtreecommitdiffstats
path: root/demos/declarative/photoviewer/PhotoViewerCore/RssModel.qml
diff options
context:
space:
mode:
Diffstat (limited to 'demos/declarative/photoviewer/PhotoViewerCore/RssModel.qml')
-rw-r--r--demos/declarative/photoviewer/PhotoViewerCore/RssModel.qml13
1 files changed, 13 insertions, 0 deletions
diff --git a/demos/declarative/photoviewer/PhotoViewerCore/RssModel.qml b/demos/declarative/photoviewer/PhotoViewerCore/RssModel.qml
new file mode 100644
index 0000000..ddbc02b
--- /dev/null
+++ b/demos/declarative/photoviewer/PhotoViewerCore/RssModel.qml
@@ -0,0 +1,13 @@
+import Qt 4.6
+
+XmlListModel {
+ property string tags : ""
+
+ source: "http://api.flickr.com/services/feeds/photos_public.gne?"+(tags ? "tags="+tags+"&" : "")
+ query: "/feed/entry"
+ namespaceDeclarations: "declare default element namespace 'http://www.w3.org/2005/Atom';"
+
+ XmlRole { name: "title"; query: "title/string()" }
+ XmlRole { name: "content"; query: "content/string()" }
+ XmlRole { name: "hq"; query: "link[@rel='enclosure']/@href/string()" }
+}