summaryrefslogtreecommitdiffstats
path: root/src/declarative/extra/qmlxmllistmodel.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-05-01 01:21:44 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-05-01 01:21:44 (GMT)
commit1206e9fb0c9a21e60b1e6841bb3071daa1f0da8a (patch)
tree019e5bf36d8f97c487edac68381b6dcaaf3d6129 /src/declarative/extra/qmlxmllistmodel.cpp
parent09be36905f81923e665743520b93a24af0ec784d (diff)
downloadQt-1206e9fb0c9a21e60b1e6841bb3071daa1f0da8a.zip
Qt-1206e9fb0c9a21e60b1e6841bb3071daa1f0da8a.tar.gz
Qt-1206e9fb0c9a21e60b1e6841bb3071daa1f0da8a.tar.bz2
More format conversion.
Diffstat (limited to 'src/declarative/extra/qmlxmllistmodel.cpp')
-rw-r--r--src/declarative/extra/qmlxmllistmodel.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/declarative/extra/qmlxmllistmodel.cpp b/src/declarative/extra/qmlxmllistmodel.cpp
index 91c8139..6b8f285 100644
--- a/src/declarative/extra/qmlxmllistmodel.cpp
+++ b/src/declarative/extra/qmlxmllistmodel.cpp
@@ -74,11 +74,14 @@ QML_DEFINE_TYPE(QmlXmlListModel, XmlListModel);
The following is an example of a model containing news from a Yahoo RSS feed:
\qml
- <XmlListModel id="FeedModel" src="http://rss.news.yahoo.com/rss/oceania" query="doc($src)/rss/channel/item">
- <Role name="title" query="title/string()"/>
- <Role name="link" query="link/string()"/>
- <Role name="description" query="description/string()" isCData="true"/>
- </XmlListModel>
+ XmlListModel {
+ id: FeedModel
+ source: "http://rss.news.yahoo.com/rss/oceania"
+ query: "doc($src)/rss/channel/item"
+ Role { name: "title"; query: "title/string()" }
+ Role { name: "link"; query: "link/string()" }
+ Role { name: "description"; query: "description/string()"; isCData: true }
+ }
\endqml
\note The model is currently static, so the above is really just a snapshot of an RSS feed.
*/