Hi,I have a xml file, which I want to add two lines and delete one line of it. For the adding lines, I will use stringbuffer and append method to add it as a whole string, but how can I change it back to a temp File for transferring? and How can I delete one line in my XML files? it will be start with "<?"`end with "?>" Thanks for any suggestins and help!! Roy
SCJP 1.4/SCBCD/SCWCD<br />MCSE<br />IBM professional XML Developer<br />SAP certified Development Consultant (NetWeaver portal and Web JavaApplication)
posted 15 years ago
If You want to manipulate existing file content You can check java.io.RandomAccessFile. But for manipulating xml file content You should user dom parser, which recreates xml as a tree and lets You change it and than write to a file.