我有这个代码
private void nextActionPerformed(java.awt.event.ActionEvent evt) {
File myfile;
FileInputStream myInputStream;
InputStreamReader myInputStreamReader;
BufferedReader myBufferedReader;
String databasedir =
"C:\\Users\\himu\\Documents\\NetBeansProjects\\database\\src\\database\\databases\\";
try{
myfile = new File(databasedir+dbname.getText());
myInputStream = new FileInputStream(myfile);
myInputStreamReader = new InputStreamReader(myInputStream);
myBufferedReader = new BufferedReader(myInputStreamReader);
String xmlval =
"<database>"
+ "<db id =" +dbname.getText() +">"
+ " <dbfileloc>" +myfile
+ "</dbfileloc> "
+ "</db>"
+ "</database>";
}
catch(Exception e)
{
}
}
**我想在已创建的dbrepoloc.xml文件中将xmlval的前一个条目后面的字符串xmlval附加到该文件中,该文件具有此位置C:\ Users \ himu \ Documents \ NetBeansProjects \ database \ src \ database \ dbrepoloc。 xml我没有得到上面提到的确切代码请帮帮我