07-23-2009 12:43 PM
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 !!!
In case of: I'm using Eclipse Plugin 126.96.36.199.
07-26-2009 04:00 AM
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.