Pankaj Pareek
Pankaj Pareek

Reputation: 589

BlackBerry - Modify innnet text of node in xml file

I am working on blackberry java development. I am having a xml file:

<?xml version="1.0" encoding="UTF-8"?>
<settings>
    <url>www.test.com</url>
    <username>testuser</username>
    <password>sun123ARC</password>
    <width>350</width>
    <height>350</height>
</settings>

I want to change the inner text of all nodes. After saving when I open the xml file again, the saved data should open. How can I do that?

Upvotes: 1

Views: 436

Answers (2)

Marc Novakowski
Marc Novakowski

Reputation: 45398

You don't mention what this is for in your question, but if your goal is to persist configuration data for your app, you may also want to look into using the PersistentStore API instead of storing XML files to the filesystem. No third-party libraries requires and it only takes a few lines of code.

Upvotes: 1

Maksym Gontar
Maksym Gontar

Reputation: 22775

I see two options:

Upvotes: 0

Related Questions