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
connyhald
Posts: 102
Registered: ‎06-03-2012
My Device: Playbook
My Carrier: *

Using XmlDataModel with data in elements not attributes?

Sorry, I think I must be really blind or tired, but I cannot find out how to use XmlDataModel with a XML file where the data is inside elements without using attributes.

 

E.g.

<x>

  <item>

    <name>Peter</name>

    <nick>Pete</nick>

  </item>

  <!-- more items -->

</x>

 

ListItemData.name and ListItemData.nick do not return anything. All examples that I can find are using XML attributes to store the data. Unfortunately I'm not in control of the XML format and also I'd like to avoid parsing XML using C++.

 

Thanks!

Conny

 

-----------
http://kodira.de
BB Apps: Pattern :: Plonk
Please use plain text.
Developer
raj_jyani
Posts: 107
Registered: ‎05-11-2011
My Device: BlackBerry Z10 LE
My Carrier: AirTel

Re: Using XmlDataModel with data in elements not attributes?

Please use plain text.
Developer
connyhald
Posts: 102
Registered: ‎06-03-2012
My Device: Playbook
My Carrier: *

Re: Using XmlDataModel with data in elements not attributes?

Thanks for the reply. I already thought the answer will be like this :smileysad:

 

It's a pity that Cascades is still not up to even such basic tasks. No accessing XML via HTTP, no images via HTTP, no proper XML handling. I assume those features will come eventually so it doesn't make sense for me to reimplement them in C++ now. I guess I'll wait another month and try again...

 

 

-----------
http://kodira.de
BB Apps: Pattern :: Plonk
Please use plain text.
Developer
MFSI
Posts: 80
Registered: ‎09-03-2012
My Device: 9810
My Carrier: Vodafone

Re: Using XmlDataModel with data in elements not attributes?

Hi connyhald,

 

                     You wrote . "No accessing XML via HTTP, no images via HTTP, no proper XML handling."


I don't know about the images using HTTP, but yes I have accessed HTTP response as Xml and also done Xml Handling in my app.

Always Success
Please use plain text.
Developer
connyhald
Posts: 102
Registered: ‎06-03-2012
My Device: Playbook
My Carrier: *

Re: Using XmlDataModel with data in elements not attributes?

Hi MFSI,

 

I'm sure you have done that. But have you done it using only Cascades/QML? If yes, I'd be interessed how you did that.

 

Thanks,

Conny

 

-----------
http://kodira.de
BB Apps: Pattern :: Plonk
Please use plain text.
Developer
MFSI
Posts: 80
Registered: ‎09-03-2012
My Device: 9810
My Carrier: Vodafone

Re: Using XmlDataModel with data in elements not attributes?

Yes done both tasks in C++ using QtNetwork and QtXml api's respectively.

Always Success
Please use plain text.
Developer
connyhald
Posts: 102
Registered: ‎06-03-2012
My Device: Playbook
My Carrier: *

Re: Using XmlDataModel with data in elements not attributes?

Well, obviously it is possible using Qt/C++. That's the reason why I was talking about Cascades :smileyhappy:

-----------
http://kodira.de
BB Apps: Pattern :: Plonk
Please use plain text.