Oops made a mistake in the code I posted above.
Fixed the code you posted and tested it. Works ok like this.

Code:

Break on
;
$sourcefile = "d:\XMLfile.xml"
$newfile = "d:\newXMLfile.xml"
;
$rc = Open (1, $sourcefile, 2)
$rc = Open (2, $newfile, 5)
;
$line = ReadLine (1)
While @ERROR = 0
If InStr ($line, "This is too cool")
$line = Split($line, "This is too cool")
$line = Join ($line, "Dude")
$rc = WriteLine (2, $line + @CRLF)
Else
$rc = WriteLine (2, $line + @CRLF)
EndIf
$line = ReadLine (1)
Loop
;
$rc = Close(1)
$rc = Close(2)

_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.