Parse XML file on BlackBerry

后端 未结 4 663
执笔经年
执笔经年 2020-12-01 15:17

I want to know how to parse XML data on a BlackBerry.

I read somewhere that JSON is good method to parse xml data.

Are there any tutorials to parse XML data

4条回答
  •  萌比男神i
    2020-12-01 16:09

    Parsing is usually done using a 3rd party library that can be loaded into a project. If you're using XML, I've used a library called the kXML parser. Setting it up can be a pain, but there are instructions on how to set it up here -

    http://supportforums.blackberry.com/t5/Java-Development/Tutorial-How-To-Use-3rd-Party-Libraries-in-your-Applications/m-p/177543

    http://www.craigagreen.com/index.php?/Blog/blackberry-and-net-webservice-tutorial-part-1.html

    Using kXML is pretty straight forward. This tutorial here explains how to parse an XML file -

    http://www.roseindia.net/j2me/kxml/j2me-xml-parser.shtml

    Edit: Whoops, the first tutorial in the next post has a pretty comprehensive overview on xml parsing on kxml2. So my post's kinda redundant.

提交回复
热议问题