我想在xml cv文件中修改我的名字,但当我使用以下语句时:
XMLOutputFactory xof = XMLOutputFactory.newInstance();
XMLStreamWriter xtw = null;
xtw = xof.createXMLStreamWriter(new FileWriter("eman.xml"));该文件的所有内容都将被删除,并变为空。基本上,我希望在不删除其内容的情况下打开(eman.xml)进行修改。
发布于 2013-06-08 03:35:45
关于使用stax同时读写的问题也在这里得到了回答:How to modify a huge XML file by StAX?
https://stackoverflow.com/questions/4041811
复制相似问题