View Single Post
Old 09-07-2007, 10:42 AM
wellilein wellilein is online now
Registered User
Join Date: 11-30-2005
Posts: 53
Updating multiple nodes

This is where I wanted to update multiple nodes:

The Visual Studio Project Files (.csproj) is XML. In this file, <DefineConstants> element is available. I need to set it for all available configurations, not only for one.

We build different versions of our program with different constants. I'd like to use the Write XML Action with the "Append to existing value" option for appending new constants.

Currently I'm using a Replace in file action instead, which works quite well, because everything's on one line.

There was another usage:

Visual Studio Resource Files are also XML. I'd like to set multiple entries to "False" there, which would have been easy using XPath.

I.e. I want to select /root/data[@type="System.Boolean, mscorlib"]/value and change all values to False in case of the demo version of the program.

This is a little complicated using regular expressions, because it goes over multiple lines.

Thank you.
Reply With Quote