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

Java Development

Reply
Developer
Posts: 90
Registered: ‎06-15-2009
My Device: Bold 9700
My Carrier: Orange IL

XML, DOM, kSOAP, kXML, Xpath, SAX ??? I'm lost...

Hi all,

 

Is there someone who can help and explain and/or summarize the differents options about XML Parsing on BB ?

 

In my current project, I have to parse few XMLs (one config file saved on the device and others via XML/HTTP).

I've googled the subject and searched on the forums previous posts, but there seems to be too many options that I don't know what to choose

 

I have to parse a huge XML file of settings (reading only), and will have to exchange data with a sever using a predefined schema (probably saved in the config file) via XML/HTTP (i.e. read/write).

 

Several hints from what I'vre read:

- SAX is fast but more adapted to Read. API to use is RIM SAXParser

- DOM is good for Read/Write but works slowly

- There is minixpath but I don't know what are its pros and cons

- kXML is working slowly and jfisher discouraged its use

- kSOAP - no idea what to think about it...

 

In the past, I played with XPATH in Perl, but this time I feel lost...

 

Did anyone tried several of them and can compare and summarize their complexity, preformance better than what I did?

In an ideal world, I may use only one lib, but now it looks like I'll use the SAX for my config file and DOM for my XML/HTTP stuff...

Any suggestion ?

 

Thanks in advance for any help !!!

 

Marc

 

In case of: I'm using Eclipse Plugin 1.0.0.67.

Developer
Posts: 90
Registered: ‎06-15-2009
My Device: Bold 9700
My Carrier: Orange IL

Re: XML, DOM, kSOAP, kXML, Xpath, SAX ??? I'm lost...

Nobody ? :-(
Developer
Posts: 905
Registered: ‎02-07-2009
My Device: BlackBerry Torch 9800
My Carrier: Globe Telecom

Re: XML, DOM, kSOAP, kXML, Xpath, SAX ??? I'm lost...

it's better to use the xml library of RIM such as SAXParser and DOM than using KSoap and KXml. using third party library makes your application bigger in terms of size. 

 

you can use DOM for the configuration coz you only load the configuration once. then use the RIM XMLWriter when exchanging data to a server in xml format.