[XML-SIG] Deleting and appending of a file, without reading into memory
gary cor
stuff4gary@hotmail.com
Thu, 03 May 2001 19:48:34
I want to add some text onto the end of an XML file just before the closing
tag but I don't want to read the whole file into memory as it is quite a
large file. I am trying to do the following:
1. delete 14 characters off the end of the file (the closing tag)
2. add some new data text from a cgi script onto this
ie - file.append(cgi_resxml)
3. - then add back on the closing tag (14 character '</root>')
ie - file.append('</root>')
I can manage (2.) & (3.) no problems opening the file handler with append
access ('a'), but I can't get into to do (1.) as well... does this append
function have a reverse function and can I use that, or should I be doing
this a differn't way?
Kind Regards
Gary
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.