| [reply] |
Hi leobebert. This is really basic. When you seek help on a technical forum, it's useless and annoying to those that could help you, to say only "this doesn't work" or "I can't do that".
Give the information that will allow any willing helpers to diagnose your problem. Specifically: What tool(s) are you using, what documentation have you read, what code have you tried, what result do you get? This means, show your actual attempt and your actual results. No more vague questions!
The way forward always starts with a minimal test.
| [reply] |
I can not do insert before tag "</catalog>"
You don't provide enough information, so this is a shoot in the dark. Are you aware that it is not usually possible to directly modify the contents an ordinary sequential file (except appending new contents at the end). But there are some ways to work around that limitation.
One of the common ways to modify a file is to read it into memory, to modify the contents in memory, and to write back the modified contents into the file (i.e. clobbering the existing content). Usually, you would first rename the original file or use a temporary file for writing, and do the necessary house-cleaning afterwards, once you have confirmed that everything went well, just to make sure you don't accidentally delete your original data.
| [reply] |