| Author |
String to File? Del. one line in a file?
|
Roy Huang
Ranch Hand
Joined: Nov 21, 2001
Posts: 104
|
|
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)
|
 |
Maciej Kolodziej
Greenhorn
Joined: Feb 11, 2002
Posts: 26
|
|
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.
|
MK
|
 |
 |
|
|
subject: String to File? Del. one line in a file?
|
|
|