summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-06-29 04:40:34 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-06-29 04:40:34 (GMT)
commit3d725363a43d408e1f57292fc54ab2925529fa6e (patch)
tree981d9e9f3f33aabb3567bbbf99224215dfbfcdd6 /examples
parent271c4ea851b71ddc346ab5b7d251c61e5e44c424 (diff)
downloadQt-3d725363a43d408e1f57292fc54ab2925529fa6e.zip
Qt-3d725363a43d408e1f57292fc54ab2925529fa6e.tar.gz
Qt-3d725363a43d408e1f57292fc54ab2925529fa6e.tar.bz2
Cleanup, fixes, and basic docs for XmlListModel.
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/flowview/flickr.qml22
-rw-r--r--examples/declarative/xmldata/daringfireball.qml8
-rw-r--r--examples/declarative/xmldata/yahoonews.qml8
3 files changed, 19 insertions, 19 deletions
diff --git a/examples/declarative/flowview/flickr.qml b/examples/declarative/flowview/flickr.qml
index fa8233b..2742839 100644
--- a/examples/declarative/flowview/flickr.qml
+++ b/examples/declarative/flowview/flickr.qml
@@ -8,19 +8,19 @@ Rect {
XmlListModel {
id: FeedModel
source: "http://api.flickr.com/services/feeds/photos_public.gne?format=rss2"
- query: "doc($src)/rss/channel/item"
+ query: "/rss/channel/item"
namespaceDeclarations: "declare namespace media=\"http://search.yahoo.com/mrss/\";"
- Role { name: "title"; query: "title/string()" }
- Role { name: "imagePath"; query: "media:thumbnail/@url/string()" }
- Role { name: "url"; query: "media:content/@url/string()" }
- Role { name: "description"; query: "description/string()" }
- Role { name: "tags"; query: "media:category/string()" }
- Role { name: "photoWidth"; query: "media:content/@width/string()" }
- Role { name: "photoHeight"; query: "media:content/@height/string()" }
- Role { name: "photoType"; query: "media:content/@type/string()" }
- Role { name: "photoAuthor"; query: "author/string()" }
- Role { name: "photoDate"; query: "pubDate/string()" }
+ XmlRole { name: "title"; query: "title/string()" }
+ XmlRole { name: "imagePath"; query: "media:thumbnail/@url/string()" }
+ XmlRole { name: "url"; query: "media:content/@url/string()" }
+ XmlRole { name: "description"; query: "description/string()" }
+ XmlRole { name: "tags"; query: "media:category/string()" }
+ XmlRole { name: "photoWidth"; query: "media:content/@width/string()" }
+ XmlRole { name: "photoHeight"; query: "media:content/@height/string()" }
+ XmlRole { name: "photoType"; query: "media:content/@type/string()" }
+ XmlRole { name: "photoAuthor"; query: "author/string()" }
+ XmlRole { name: "photoDate"; query: "pubDate/string()" }
}
ListView {
diff --git a/examples/declarative/xmldata/daringfireball.qml b/examples/declarative/xmldata/daringfireball.qml
index b14dfbf..6f3461e 100644
--- a/examples/declarative/xmldata/daringfireball.qml
+++ b/examples/declarative/xmldata/daringfireball.qml
@@ -6,17 +6,17 @@ Rect {
XmlListModel {
id: feedModel
source: "http://daringfireball.net/index.xml"
- query: "doc($src)/feed/entry"
+ query: "/feed/entry"
namespaceDeclarations: "declare default element namespace 'http://www.w3.org/2005/Atom';"
- Role {
+ XmlRole {
name: "title"
query: "title/string()"
}
- Role {
+ XmlRole {
name: "tagline"
query: "author/name/string()"
}
- Role {
+ XmlRole {
name: "content"
query: "content/string()"
}
diff --git a/examples/declarative/xmldata/yahoonews.qml b/examples/declarative/xmldata/yahoonews.qml
index d20da99..9d0c956 100644
--- a/examples/declarative/xmldata/yahoonews.qml
+++ b/examples/declarative/xmldata/yahoonews.qml
@@ -9,16 +9,16 @@ Rect {
XmlListModel {
id: feedModel
source: "http://rss.news.yahoo.com/rss/oceania"
- query: "doc($src)/rss/channel/item"
- Role {
+ query: "/rss/channel/item"
+ XmlRole {
name: "title"
query: "title/string()"
}
- Role {
+ XmlRole {
name: "link"
query: "link/string()"
}
- Role {
+ XmlRole {
name: "description"
query: "description/string()"
}