
July 2nd, 2004, 01:48 AM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
The disadvangage of this is that you're reading the whole file into to memory and preforming an action on it. If the file is large then this isn't going to be a good thing. For small files it fine  but use file itorators where possiable. In this case you can also avoid the (slight) overhead of importing and using regex.
Why not just make changes to the XML file? Surly, if its not bing treated as valid XML then you want to make it so. So You could write the none blank lines back into the original file and be done with it  .
Take care,
Mark.
Last edited by netytan : July 2nd, 2004 at 01:53 AM.
|