|
Hi,
I want to update an the following XML but I'm having some trouble doing it.
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings>
<add key="workFlow" value="C:\workflow"/>
</appSettings>
</configuration>
Here's is my task definition
<XmlFile
TaskAction="UpdateAttribute"
File="web.config"
XPath="/configuration[@xmlns='http://schemas.microsoft.com/.NetConfiguration/v2.0']/appSettings/add[@key='workflow']"
Key="value"
Value="$(WorkflowConfigPath)"/>
The above task does not work, but the following works:
<configuration>
<appSettings>
<add key="workFlow" value="C:\workflow"/>
</appSettings>
</configuration>
-----------------------------------------------------------------------
<XmlFile
TaskAction="UpdateAttribute"
File="web.config"
XPath="/configuration/appSettings/add[@key='workflow']"
Key="value"
Value="$(WorkflowConfigPath)"/>
Is there a way to get the first scenario to work? If so, how? I have other XML elements that has an xmlns attribute that I want to update, for instance hibernate configurations.
Thanks.
|