Quantcast
Channel: Indigo Rose Software Forums - Forums
Viewing all articles
Browse latest Browse all 2105

Change/Replace string that contains "" characters?

$
0
0
Hi,

I am a noob that can't seem to figure out how to replace text within an xml file that contains "" characters. I will give an example:

Here are a couple lines from the file:

vlookatmin=""
vlookatmax=""

I want to search and replace this line:

vlookatmax=""

with this added information

vlookatmax="42"

However I am receiving an error in the script because of the "".

Here is the code I have been working on:

-- Find and replace the text
SourceFile = TextFile.ReadToString("C:\\test\\vtour\\tour.xml")
SourceFile = String.Replace(SourceFile, "vlookatmax=""", "vlookatmax="42"", false);

-- Save the file
TextFile.WriteFromString("C:\\test\\vtour\\tour3.x ml", SourceFile, false)

Any help would be greatly appreciated....I have been at it for 10 hours :-)
Thank You!

Viewing all articles
Browse latest Browse all 2105

Trending Articles