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
Super Contributor
Posts: 308
Registered: ‎05-31-2011
My Device: Blackberry-SDK-9800
My Carrier: SimPakage 6.0.0.337_9800 asia.exe

how to convert the element node and its child node of xml to string in blackberry

hello friends its urgent,

   <app>

<pl>yogehs</pl>

</app>

    i want to convert this into string.... plz tell me how can i achived.

Developer
Posts: 588
Registered: ‎05-29-2009
My Device: 9100

Re: how to convert the element node and its child node of xml to string in blackberry

Trusted Contributor
Posts: 184
Registered: ‎11-26-2010
My Device: Not Specified

Re: how to convert the element node and its child node of xml to string in blackberry

you can use SAX PARSER, I have attached couple of links that provide you with an example.

 

http://developerlife.com/tutorials/?p=28

 

http://stackoverflow.com/questions/2757990/parse-xml-file-on-blackberry

 

http://jsinghfoss.wordpress.com/2009/09/06/sax-parsing-revising/

 

press kudos if this helped you in solving your post.

Super Contributor
Posts: 308
Registered: ‎05-31-2011
My Device: Blackberry-SDK-9800
My Carrier: SimPakage 6.0.0.337_9800 asia.exe

Re: how to convert the element node and its child node of xml to string in blackberry

no i am using xmlwriter of blackberry.... so i want to edit xml file... SAXParser i need t import the jar files again

Trusted Contributor
Posts: 184
Registered: ‎11-26-2010
My Device: Not Specified

Re: how to convert the element node and its child node of XML to string in blackberry

Oh I have not used that API, but I came across a couple of links. I have attached them below. Hope it would help you.

 

http://stackoverflow.com/questions/877428/better-approach-for-xml-creation-in-blackberry

 

http://stackoverflow.com/questions/2429439/writing-xml-file-in-blackberry-file-system-jde-v4-6