PDA

View Full Version : Help for Write XML Action not up to date


wellilein
09-07-2007, 02:30 AM
Using VBP 6.5.

The XML Write Action has been updated. It now supports namespaces. However, the help file still describes XML Write Action from VBP 6.3, which does not support namespaces.

Detail problems:
mk:@MSITStore:C:\Programme\VisBuildPro65\VisBuildP ro.chm::/writexmlaction.htm
"File Tab" leads to a page called "Transform Tab"
"XPath Tab" leads to a page called "Filter Tab"

mk:@MSITStore:C:\Programme\VisBuildPro65\VisBuildP ro.chm::/writexmlfiletab.htm
Screenshot is not up to date

mk:@MSITStore:C:\Programme\VisBuildPro65\VisBuildP ro.chm::/writexmlxpathtab.htm
Screenshot is missing

There is no hint that the Write XML Action will only update the first node found, instead of all nodes.

kinook
09-07-2007, 07:16 AM
The screen shot is out of date and the topic captions are mislabeled (which we'll correct), but all the fields are documented.

It's not explicitly stated, but all references to the node being updated/created are singular. If you can provide an example of needing to update multiple matching nodes, we'll consider supporting that in the future. Thanks.

wellilein
09-07-2007, 09:42 AM
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.