This 0ne Pr0grammer
This 0ne Pr0grammer

Reputation: 2662

How to Set Boolean Field Using JDOM

Just a quick question, does anyone know what the correct method to use is when you want to change the value of a boolean field within an xml file using JDOM in java?

For example, I know if I want to change the value of a string field, all I have to do is:

documentLevelFieldChild.getChild("Value").setText("This is the new text");

And I tried,

documentLevelFieldChild.getChild("Value").setValue(false);

But that doesn't seem to work.

I tried looking up the API and found a method related to getting the bool value, but nothing related to setting it. Any help would be greatly appreciated.

Upvotes: 1

Views: 266

Answers (1)

gefei
gefei

Reputation: 19856

documentLevelFieldChild.getChild("Value").setText("false");

Upvotes: 2

Related Questions