Kotibab
Kotibab

Reputation: 85

Parsing XML webservice in black berry

I need to parse below xml file in black berry

<Vehicles> 
    <Car> 
        <ID>000001</ID> 
        <Make>Audi</Make> 
    </Car> 
    <Car> 
        <ID>000002</ID> 
        <Make>Buick</Make> 
    </Car> 
    <Car> 
        <ID>000015</ID> 
        <Make>Chevrolet</Make> 
    </Car> 
    <Car> 
        <ID>000003</ID> 
        <Make>Chrysler</Make> 
    </Car>  
</Vehicles> 

Can any one pleae tell me how to parse it.

Upvotes: 0

Views: 413

Answers (2)

Vit Khudenko
Vit Khudenko

Reputation: 28418

As a starting point check the "xmldemo" sample app. It is a part of the BB SDK placed on your PC. XMLDemoScreen has an example of a DOM-parser implementaion.

Upvotes: 0

Jomy John
Jomy John

Reputation: 6518

Please look into the following posts in stackoverflow.com

Parse XML file on BlackBerry

BlackBerry/J2ME - SAX parse collection of objects with attributes

Note: Please search in stackoverflow.com before post an issue.

Upvotes: 2

Related Questions