Need XMLUpdate Activity

Dec 5, 2011 at 7:18 PM


What is the best way to get XMLUpdate functionality which is present in MSBuildExtension.

I am currently using TFSBuildExtension to customize the build template.




Dec 10, 2011 at 5:40 PM


I have a need for the XML validation and XSL transform functionality as well.  I am adding this to the library.  If you need the other features, let me know.


Stuart Schaefer

Dec 10, 2011 at 11:27 PM
Edited Dec 10, 2011 at 11:27 PM

Thanks Stuart


I am looking for these functionalities:

XmlMassUpdate:  Performs multiple updates on an XML file 
XmlQuery: Reads a value or values from lines of XML 
XmlRead: Reads a value from a XML document using a XPath. 
XmlUpdate: Updates a XML document using a XPath.   

Please let me know by when these functionalities will be made available.



Feb 13, 2012 at 8:39 PM

Can the activity 'XMLFile' be used to update fields in an XML file?

Feb 13, 2012 at 8:49 PM

What do you mean by field? Can you put together a sample showing what you would like to do?


Feb 14, 2012 at 5:24 AM
Edited Feb 14, 2012 at 5:27 AM

I am trying to do something like the 'XmlPeek' task in Nant, i.e. extracting text form an XML file at a location specified by an Xpath expression.

This is my XML file App.Config

<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns="">
        <add key="server" value="" />

The parameters I am passing to the xmlFile activity are 
File = "App.config"
xPath = "/x:configuration/x:appSettings/x:add[@key = 'server']/@value"

I am having trouble with the Namespaces parameter as it is an 
IDictionary<String, String> type; I am not sure how I can pass an 
object of this type into the workflow.
Feb 14, 2012 at 3:25 PM

When you select the Namepaces argument, it needs to be a VisualBasicValue.  Here is an example of adding the default namespace for a Windows Azure configuration document....

New Dictionary(Of String, String) From
    {{"tns", ""}}

If you need to add multiple namespaces, they look like this:

New Dictionary(Of String, String) From
    { {"ns1", "http://namespace1/"}, { "ns2", "http://namespace2/"}, .... }

Feb 14, 2012 at 4:11 PM

Thanks a lot, that worked for me.