QML: Using two XmlListModel elements for a single request
-
Hi
I am playing with flickr APIs from QML/JavaScript. All the communication to the server happens via REST/XML and I use XmlListModel element for parsing the results. The problem is that requests can sometimes fail (e.g. authorization expired) and before extracting the actual data I need to check the error code in the very first element of XML. Depending on the error code the rest of the XML should be processed via one or another XmlListModel.
Is there a way to parse the same request several times with the help of different models?
I wouldn't like to issue a second request just to be able to process the same result in a different way.Cheers,
Artem. -
Oh, I didn't realize you can fill the model without using the source. Thanks for the hint!
-
Forgot to comment on it.
Tried, works, thanks!