I have a installer through which i need to update an XML file. I have done these kinds of stuff many time to update application config files. But this XML file is little different and i am facing an issue to find the node. I don't know why it is not working. I have below XML:
<?xml version="1.0" encoding="utf-8"?>
<Siemens.Automation.Diagnostics
xmlns="http://www.siemens.com/Automation/2004/09/Diagnostics/ReportConfiguration">
<Report IncludeConfigFile="true" IncludeHtml="true" DisplayName="Red White Application" TargetVersion="1.0.0">
<MergePlugIns>
<MergePlugIn Path="Siemens.Automation.Diagnostics.PlugIn.dll" Type="Siemens.Automation.Diagnostics.PlugIn.ConfigurationMerger" />
</MergePlugIns>
</Report>
</Siemens.Automation.Diagnostics>
I want to update Type of MergePlugin value but i am facing issue. Below is what i am doing:
<util:XmlFile Id="UpdateProductName" Action="setValue" File="[ERRORREPORT]$(var.ErrorReportAdrFile)"
ElementPath="/Siemens.Automation.Diagnostics[\[]@xmlns='http://www.siemens.com/Automation/2004/09/Diagnostics/ReportConfiguration'[\]]/Report[\[]@DisplayName='Red White Application'[\]]/MergePlugIns/MergePlugIn[\[]@Path='Siemens.Automation.Diagnostics.PlugIn.dll'[\]]/@Type"
SelectionLanguage="XPath" Permanent="yes" Value="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SIPLACE\$(var.ProductName)"/>
But it gives an error that unable to find node. What i am missing?