title: Correct way of using msbuild xmlpoke
body: <p>I am trying to set the value for  element if the  element value matches 
  "ABB Automation Builder Platform.abpkg"</p>
  
  <p>My script uses xmlpoke as below:</p>
  
  <pre><code>&lt;XmlPoke 
                  Namespaces="&amp;lt;Namespace Prefix='x'  Uri='http://www150.abb.com/spaces/DAE-1/ProdDev/Shared%20Documents/40%20DAE%20Installer/Design/XML%20Descriptions/DAEInstaller_Description_StyleSheet' &amp;gt;"
                  Query="x:ProductUpdate/x:Packages/x:Package[x:FileName='ABB Automation Builder Platform.abpkg']/x:FileHash"
                  XmlInputPath="Output\update.manifest"
                  Value="Ajay Vishwakarma"/&gt;
  </code></pre>
  
  <p>The xml I am trying to modify is below:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ProductUpdate xmlns="http://www150.abb.com/spaces/DAE-1/ProdDev/Shared%20Documents/40%20DAE%20Installer/Design/XML%20Descriptions/DAEInstaller_Description_StyleSheet"&gt;
    &lt;Strings&gt;
      &lt;Text id="1"&gt;
        &lt;Neutral&gt;ABB Automation Builder 1.0 \nService Release 1&lt;/Neutral&gt;
        &lt;Localized culture="en"&gt;ABB Automation Builder 1.0 \nService Release 1&lt;/Localized&gt;
        &lt;Localized culture="de"&gt;ABB Automation Builder 1.0 \nService Release 1&lt;/Localized&gt;
        &lt;Localized culture="fr"&gt;ABB Automation Builder 1.0 \nService Release 1&lt;/Localized&gt;
        &lt;Localized culture="es"&gt;ABB Automation Builder 1.0 \nService Release 1&lt;/Localized&gt;
        &lt;Localized culture="zh"&gt;ABB Automation Builder 1.0 \nService Release 1&lt;/Localized&gt;
      &lt;/Text&gt;
      &lt;Text id="2"&gt;
        &lt;Neutral&gt;Information\ABB Automation Builder Upate Package V1_0_1Description_en.htm&lt;/Neutral&gt;
        &lt;Localized culture="en"&gt;Information\ABB Automation Builder Upate Package V1_0_1Description_en.htm&lt;/Localized&gt;
        &lt;Localized culture="de"&gt;Information\ABB Automation Builder Upate Package V1_0_1Description_de.htm&lt;/Localized&gt;
        &lt;Localized culture="fr"&gt;Information\ABB Automation Builder Upate Package V1_0_1Description_fr.htm&lt;/Localized&gt;
        &lt;Localized culture="es"&gt;Information\ABB Automation Builder Upate Package V1_0_1Description_es.htm&lt;/Localized&gt;
        &lt;Localized culture="zh"&gt;Information\ABB Automation Builder Upate Package V1_0_1Description_zh.htm&lt;/Localized&gt;
      &lt;/Text&gt;
    &lt;/Strings&gt;
    &lt;ReleaseType&gt;ServicePack&lt;/ReleaseType&gt;
    &lt;ProductName&gt;$1&lt;/ProductName&gt;
    &lt;Version&gt;1.0.1&lt;/Version&gt;
    &lt;Description&gt;$2&lt;/Description&gt;
    &lt;License&gt;
      &lt;Name&gt;$3&lt;/Name&gt;
      &lt;ID&gt;45668677876463&lt;/ID&gt;
      &lt;Description&gt;$4&lt;/Description&gt;
      &lt;Version&gt;1.0.1&lt;/Version&gt;
      &lt;DescriptionVersion&gt;$5&lt;/DescriptionVersion&gt;
      &lt;DescriptionTypeVersion&gt;1.0.0&lt;/DescriptionTypeVersion&gt;
      &lt;ToAccept&gt;true&lt;/ToAccept&gt;
    &lt;/License&gt;
    &lt;Copyright&gt;$6&lt;/Copyright&gt;
    &lt;MinimumRequiredVersion&gt;1.0.0&lt;/MinimumRequiredVersion&gt;
    &lt;Packages&gt;
      &lt;Package&gt;
        &lt;Name&gt;ABB Automation Builder Platform Update Package&lt;/Name&gt;
        &lt;Description&gt;ABB Automation Builder Platform Update Package&lt;/Description&gt;
        &lt;FileName&gt;ABB Automation Builder Platform.abpkg&lt;/FileName&gt;
        &lt;FileHash&gt;AjayVishwakarma&lt;/FileHash&gt;
        &lt;FileDownload&gt;
        &lt;/FileDownload&gt;
        &lt;InstallerData&gt;
          &lt;Component&gt;
            &lt;Name&gt;ABB Automation Builder Package Manager&lt;/Name&gt;
            &lt;ID&gt;{F5B05B3F-9FA5-476E-BDD3-DB1397CABF4C}&lt;/ID&gt;
            &lt;Version&gt;1.0.1.0&lt;/Version&gt;
            &lt;InstallAlways&gt;true&lt;/InstallAlways&gt;
          &lt;/Component&gt;
        &lt;/InstallerData&gt;
      &lt;/Package&gt;
      &lt;Package&gt;
        &lt;Name&gt;PLC AC500 Update Package&lt;/Name&gt;
        &lt;Description&gt;PLC AC500 Update Package&lt;/Description&gt;
        &lt;FileName&gt;PLC - AC500.abpkg&lt;/FileName&gt;
        &lt;FileHash&gt;8652d588d4c1fe70e0e06a9cf3e09193&lt;/FileHash&gt;
        &lt;FileDownload&gt;
        &lt;/FileDownload&gt;
        &lt;InstallerData&gt;
          &lt;Component&gt;
            &lt;Name&gt;Codesys&lt;/Name&gt;
            &lt;ID&gt;{F8A33E2A-5B6A-474B-8ED2-293B4982D4E6}&lt;/ID&gt;
            &lt;Version&gt;2.3.9.41&lt;/Version&gt;
          &lt;/Component&gt;
          &lt;Component&gt;
            &lt;Name&gt;Target Support Package&lt;/Name&gt;
            &lt;ID&gt;{CC764263-BEF5-4060-AA49-0366AB2E868B}&lt;/ID&gt;
            &lt;Version&gt;1.0.1.0&lt;/Version&gt;
          &lt;/Component&gt;
          &lt;Component&gt;
            &lt;Name&gt;Control Builder Plus documentation&lt;/Name&gt;
            &lt;ID&gt;{484D63DB-1EB6-4F4F-851F-7F7D7D34A396}&lt;/ID&gt;
            &lt;Version&gt;1.0.1.0&lt;/Version&gt;
          &lt;/Component&gt;
        &lt;/InstallerData&gt;
      &lt;/Package&gt;    
    &lt;/Packages&gt;
  &lt;/ProductUpdate&gt;
  </code></pre>
  
  <p>XmlPoke task fails to update element value and gives message "Made 0 replacement(s)."
  I have also tries passing query like</p>
  
  <p>Query="//x:ProductUpdate/x:Packages/x:Package[x:FileName='ABB Automation Builder Platform.abpkg']/x:FileHash" OR 
  Query=".//x:ProductUpdate/Packages/Package[FileName='ABB Automation Builder Platform.abpkg']/FileHash"</p>
  
  <p>I want to know if I am doing it the wrong way? 
  Please note that I don't want to make any changes in the namespace in my xml document.</p>