QML XmlListModel refusing to show my model



Having a weird problem with my QML XmlListModel, it's not showing my model at all, it returns no error string, but works with a random rss when I change the link and query:



XmlListModel {
id: feedModel
source: "model.xml"
query: "/model/application/item"
onProgressChanged: {console.debug(feedModel.progress)}

XmlRole { name: "name"; query: "name/string()" }
//XmlRole { name: "link"; query: "link/string()" }
//XmlRole { name: "image"; query: "image/string()"}
}


model.xml:



<?xml version="1.0" encoding="utf-8"?>
<model>
<application>
<item>
<name>test</name>
</item>

<item>
<name>test1</name>
</item>

<item>
<name>test2</name>
</item>

<item>
<name>test3</name>
</item>
</application>

</model>


It all looks okay to me, the query is looking in /model/application/item with the only role at the moment as name, but nothing shows at all, I'm kind of confused. The model is on my server and is completely accessible.


No comments:

Post a Comment