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

Web and WebWorks Development

Reply
New Contributor
davidlondubat
Posts: 7
Registered: ‎09-18-2013
My Device: Z10
My Carrier: T-MOBILE
Accepted Solution

Saving and editing data with XML

Hello, I'm new developer and trying HTML5.

Theres some difference to use XML to save, load and editing data? How I can do this in a easy way for BlackBerry 10?

Thank you for the help!

Please use plain text.
BlackBerry Development Advisor
chadtatro
Posts: 614
Registered: ‎10-01-2009
My Device: Z10
My Carrier: Bell

Re: Saving and editing data with XML

Hello,

 

I found a great tutorial on working with XML in JavaScript. It may not cover every piece of what you're looking for, but it is pretty thorough.

 

http://oreilly.com/catalog/jscript5/chapter/ch21.pdf

 

On a side note, I always prefer to work with JSON over XML. I think it's cleaner, and just easier as a whole. 

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Please use plain text.
New Contributor
davidlondubat
Posts: 7
Registered: ‎09-18-2013
My Device: Z10
My Carrier: T-MOBILE

Re: Saving and editing data with XML

Hi chadtatro, thank you for the tutorial, is what I was looking for. I think is more easy develop the backend with html5 than cascades, because this I'm studying and trying found new forms to do some things.

Why JSON is better than XML? More easy? You also have some tutorial for JSON?

Best regards!
 

Please use plain text.
BlackBerry Development Advisor
chadtatro
Posts: 614
Registered: ‎10-01-2009
My Device: Z10
My Carrier: Bell

Re: Saving and editing data with XML

I find JSON is just cleaner to work with personally.

 

Lots of tutorials out there, here's one: http://www.json.org/js.html

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,543
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Saving and editing data with XML

A big benefit of JSON is also that it can minimize the amount of data being sent. JSON can be less readable without all the descriptive <element> tags, but the "minimal" approach to structure means less bytes are being transferred across the wire.
http://www.json.org/xml.html

Of course, you can write an inefficient JSON structure and an efficient XML structure, but in general JSON will get you more compact data. Both are simply structures for holding data.

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.