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

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

how to modify the nodevalue in xmldocument


i have xml document,



in above example i want to chang the value 3 to 0..

i am using this code

public void setNodeText(Document doc, String app,String valueToUpdate) {
String ret = null;

NodeList nl = doc.getElementsByTagName(app);

if(nl.getLength() == 1) {
Node n = nl.item(0);

if( n instanceof Node ) {
NodeList nl2 = n.getChildNodes();
Node n2 = nl2.item(0);




 but its not changing its value in xml file....