04-21-2013 04:03 PM - edited 04-21-2013 04:13 PM
Will the ListView DataSource only accept and parse XML of a certain format? I am not able to get the ListView to display sample XML such as:
<note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>
If it is possible, can somebody please provide an example? I can only get it to work with RSS feeds, which contain values within tag attributes. I haven't seen any examples for the above format.
If it is not possible, what is my alternative to display data in the ListView?
04-21-2013 11:38 PM
I would have used a listview with headers (in your case "note" will by the header type). Please refer to:
04-24-2013 09:16 PM
The last link is of particular interest to me, as I still cannot get the ListView working with the DataSource. I've set up the HelloWorldDataModel example within my application. Have you had any experience using a custom DataModel?As I have been slowly learning C++, my plan is to instantiate HelloWorldDataModel with a variable that is equal to the number of XML elements returned in my response, which I can then return in HelloWorldDataModel::childCount().
I will also pass the XML data into HelloWorldDataModel::data(), and figure out how to parse it correctly to return as a QVariant for the ListView...
04-25-2013 12:19 PM
vegetablesdatamodel in github Cascades samples http://blackberry.github.com/Catalogs/All_Samples.