求教于各位:如何使用JDom进行远程编辑xml文件
xgil 2003-03-25 09:06:24 private void writeXmlFile(Document d)
{
try
{
String indent = " ";
boolean newLines = true;
XMLOutputter outp = new XMLOutputter(indent,newLines);
FileWriter writer = new FileWriter("http://l0158:9999/conf/test.xml");
outp.output(d,writer);
writer.close();
}
catch (java.io.IOException e)
{
e.printStackTrace();
}
}
我用上面的方法编辑xml文件,但是运行时提示文件的目录、卷标名不正确,请问上面的代码是否有要修改的地方或有误更好的修改远程xml文件的方法