开发者

ListModel , QMap, Xml parsing

i am trying to parse some car2go response xml and create my c++ model. then expose that model to qml.

Question: which map to use Qmap or qmultimap ? and how to parse ?

so looks 开发者_开发问答car2go response : http://code.google.com/p/car2go/wiki/vehicles_v2_0

THanks in advance


You can do it much easier than that. There are 2 ways:

1) Use XmlListModel and specify the xml option as a path

2) Since JSON is supported, use AJAX technique - use XmlHttpRequest in QML and post a request to the server and operate on your JSON object by getting it using JSON.parse(xml_http_request.responseText)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜