title: How to run xpath on specific xml using xslt
body: <p>The question is almost same as one of my question here <a href="https://stackoverflow.com/questions/49225689/how-to-edit-specific-xml-using-xpath">edit specific xml using xpath</a></p>
  
  <p>But now the problem is different. The xml structure is little different now. The solution on earlier question will not work here.</p>
  
  <p>I have below xml file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;map xmlns="http://www.w3.org/2005/xpath-functions"&gt;
      &lt;map key="Request"&gt;
          &lt;map key="Headers"&gt;
              &lt;string key="Accept"&gt;application/json&lt;/string&gt;
              &lt;string key="Content-Type"&gt;application/json&lt;/string&gt;
          &lt;/map&gt;
          &lt;map key="Payload"&gt;
              &lt;map key="root"&gt;
                  &lt;array key="req1"&gt;
                      &lt;string&gt;puneet&lt;/string&gt;
                      &lt;string&gt;taneja&lt;/string&gt;
                  &lt;/array&gt;
                  &lt;array key="req2"&gt;
                      &lt;string&gt;ratan&lt;/string&gt;
                  &lt;/array&gt;
              &lt;/map&gt;
          &lt;/map&gt;
      &lt;/map&gt;
  &lt;/map&gt;
  </code></pre>
  
  <p>Below are the XPATHS</p>
  
  <pre><code>/Request/Headers/Accept=app
  /Request/Headers/Content-Type=json
  /Request/Payload/root/req1[2]=singh
  /Request/Payload/root/req1[1]=pradeep
  /Request/Payload/root/req2=suman
  </code></pre>
  
  <p>I want updated result xml as below</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;map xmlns="http://www.w3.org/2005/xpath-functions"&gt;
      &lt;map key="Request"&gt;
          &lt;map key="Headers"&gt;
              &lt;string key="Accept"&gt;application/json&lt;/string&gt;
              &lt;string key="Content-Type"&gt;application/json&lt;/string&gt;
          &lt;/map&gt;
          &lt;map key="Payload"&gt;
              &lt;map key="root"&gt;
                  &lt;array key="req1"&gt;
                      &lt;string&gt;pradeep&lt;/string&gt;
                      &lt;string&gt;singh&lt;/string&gt;
                  &lt;/array&gt;
                  &lt;array key="req2"&gt;
                      &lt;string&gt;suman&lt;/string&gt;
                  &lt;/array&gt;
              &lt;/map&gt;
          &lt;/map&gt;
      &lt;/map&gt;
  &lt;/map&gt;
  </code></pre>
  
  <p>Basically I want to change my xml on given xpaths using xslt. Check out the code at this location <a href="https://xsltfiddle.liberty-development.net/bdxtpY" rel="nofollow noreferrer">xsltfiddle.liberty-development.net</a></p>
  
  <p>It will be helpful for me to have update in same earlier solution for this scenario as well.</p>