I am trying to insert string value in an xml file , but I am not getting exactly how to insert using java.
textFieldChoose.setText(fileChooser.getSelectedFile().toString());
String str="";
final JFrame msgframe= new JFrame();
msgframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
str= textFieldChoose.getText();
JOptionPane.showMessageDialog(textFieldChoose, str);
ClassLoader classLoader = getClass().getClassLoader();
str= textFieldChoose.getText();
I can store the value in a string. I need to replace that value every time when whenever my application will pick another value in the string.
xml:-
?xml version="1.0" encoding="UTF-8"?>
<project name="org.world.rg" default="rg.init" basedir=".">
<property name="dita.dir" location="${basedir}/../../.."/>
<target name="rg.init" description="build PDF" depends="pdf"/>
<target name="pdf" description="build PDF">
<ant antfile="${dita.dir}/build.xml">
<property name="args.input" location=""/>
I need to insert that string value in location =""/>
. what are the possible ways?