hello friends,
I am newb of jDom. i am trying to change xml "Element's"--->"Text". My xml is as follows .....
<?xml version ="1.0">
<Elements>
<code>
<data>EE550</data>
</code>
</Elements>
I am trying to replace that "<data>" by <data>AA550</data>
my code is as below
SAXBuilder sb = new SAXBuilder();
Document doc = sb.build(new File("src/xml/M90EE.xml"));
Element element = doc.getRootElement();
List children = element.getChildren();
String key = (element.getChild("text").getChild("mkey").setText("AA550").getTextTrim()); System.out.println("mkey :"+key);
output:
mkey :AA550
but is it possible to change in the xml file phisically.
thanQ
Ajay