I am trying to parse xml and view it in program:
<list>
<item>
This i want
</item>
<item>
This i want 2 </item>
<item>This i want</item>
<item>This i want</item>
<item>This i want</item>
<item>This i want</item>
<item/>
<item/>
<item/>
</list>
With XmlListModel like this and view with ListModel:
XmlListModel {
id: itemmodel
source: page.dataURL
query: "/list"
XmlRole {
name: "item"
query: "item/string()"
}
}
SilicaListView {
width: 180; height: 300
model: itemmodel
delegate: Text { text: item }
}
When I run this it Qt creator says: "Unable to assign [undefined] to QString". What I am doing wrong? I am making app to Sailfish and this silicalistview is same as listview in qt. My goal is to view them like this:
This I want
This I want 2
and so on.
Thank you for your time!