Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Pumano-
Posts: 215
Registered: ‎11-05-2011
My Device: Z10
Accepted Solution

How to parse RSS using QML (Cascades)?

Hallo native devs! I'm a newbie in native development and I want to know how to parse RSS using QML in Cascades?

 

I see example like this:

 

Page {
    content: Container {
        background: Color.White
        ListView {
            rootIndexpath: [1]
            dataModel: XmlDataModel { source: "model.xml" }
        }
    }
}

 

but, may I at "source:" use "http://example.com/rss.xml"?

If yes, how i can parse?

 

Thanks for help!

 
Retired
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10

Re: How to parse RSS using QML (Cascades)?

The QML in your post assumes that the XML file is local, if you are using a remote XML file then you will need to downloading it first using some backend Qt C++ networking code, then you can use it from QML. 

 

I'd recommend starting with the Cascades Quotes sample to get a feel for how XmlDataModel parsing works then start looking into the networking and file access code.

Garett
@garettBeuk
--
Goodbye everybody!
New Developer
setiawand
Posts: 41
Registered: ‎07-12-2012
My Device: Orlando, Dev Alpha

Re: How to parse RSS using QML (Cascades)?

i`ve managed to parse RSS feed into xml model that suit for XMLDataModel, thanks to XMLStreamReader and XMLStreamWriter :smileyhappy:

Developer
alecaserez
Posts: 18
Registered: ‎08-26-2012
My Device: Z10

Re: How to parse RSS using QML (Cascades)?

please, my implementation use xml in casacades, do you have an example?

Contributor
hazemkhaled
Posts: 10
Registered: ‎04-01-2012
My Device: BlackBerry Z10 LE

Re: How to parse RSS using QML (Cascades)?

please check this tutorial

 

http://www.opensourcebb.com/osbbx/index.php/tutorials-mobile/23-native-tutorials/cascades-tutorials/...

Web / Mobile Developer, @BlackBerryEG co-manager, co-founder @eshtery, @TiCairo Manager, #Appcelerator Titan/TCAD/TCMD