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
New Contributor
Posts: 2
Registered: ‎06-15-2010
My Device: Curve 8520
My Carrier: Web Developer

manipulate XML content

Hey guys, I know my questions gonna sound silly, but I really need your help so please bear with it. I have just recently work as programmer so my general knowledge regarding programming is very low. I am working on a project right now which I have to connect to HttpConnection, run the php and build a XML file, read by XML parser, and then display it in the BlackBerry.

 

I have completed it all. My problem is I have no idea how to manipulate the content of the XML as I wanted it to be. Example of the XML :

 

<container><element>

<custId>5</custId>

<itemCode>fyx-tir-700-blk</itemCode>

<firstName>Anna</firstName>

<lastName>Lie</lastName>

<type>Single</type>

<color>Black</color>

<dateOfOrder>2010-08-02</dateOfOrder>

<quantity>2</quantity>

<status>Booked</status>

<bookingId>1</bookingId>

</element>

 

So, I want to display it in the blackberry but in the format of :

 

Date of Order : 2010-08-02

Booking Id : 1

Customer Name : Anna Lie

Type of Stock : fyx-tir-700-blk

Quantity : 2 units

 

I'd really appreciate it if anyone can tell me how to do that. So far, I only know how to read the XML document and just convert it to string. Also, is it possible to have null?because I want the last name to be optional. Thank you so much for answering and of course I'll give a lot of kudos.

 

regards,

Elisa

 

Elite II
Posts: 9,321
Registered: ‎04-01-2008
My Device: Torch 9800
My Carrier: grameenphone

Re: manipulate XML content

 

Hi Fynela,


Welcome to BlackBerry support community forums. As a new comer to the community you would be better of checking some quick answers to basic BlackBerry® questions. Like,


BlackBerry 101 will help you to get simple instructions for setting up your new device and learn specific features and functions about your BlackBerry smartphone.


Tips and Tricks will help you to get some shortcuts unique to your smartphone. Become a pro with your BlackBerry smartphone.


If you're looking for a specific query please use the search feature of the community before posting. If your desired query in not found in the forum then post your query in appropriate board mentioning your device OS version(Options -> About).


Have fun and enjoy your stay!

 

tanzim                                                                                  
If your query is resolved then please click on Accept as Solution

Click on the LIKE on the bottom right if the post deserves credit