No it does not. It replaces a specific string with something else.

I need to be able to replace < receipt >this is one text < /receipt >
with < receipt >this is another text < /receipt >
even if the XML file looks like < receipt > < /receipt >
Or if it looks like < receipt >this is another another text < /receipt >

I need the script look for line that says < receipt > and be able to replace that with what I want it to be dynamically. Every user's configuration will be slightly different.

Currently his script looks 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")
EndIf
$rc = WriteLine (2, $line + @CRLF)
$line = ReadLine (1)
Loop
;
$rc = Close(1)
$rc = Close(2)



But I don't want to just look for "This is too cool" ... I need to replace that whole line. His code just replaces the text that it searches for. I want to replace everything between < test > and < /test >