title: Exclude All Tags Except One - XSLT
body: <p>I am trying to fetch all <code>HTTPSamplerProxy</code> tags with all its children but donot want any extra text/tag.</p>
  
  <p><strong>XML</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jmeterTestPlan version="1.2" properties="3.2" jmeter="3.2 r1790748"&gt;
    &lt;hashTree&gt;
      &lt;TestPlan&gt;
        &lt;boolProp name="TestPlan.functional_mode"&gt;false&lt;/boolProp&gt;
        &lt;boolProp name="TestPlan.serialize_threadgroups"&gt;false&lt;/boolProp&gt;
        &lt;elementProp name="TestPlan.user_defined_variables" elementType="Arguments"&gt;
          &lt;collectionProp name="Arguments.arguments"/&gt;
        &lt;/elementProp&gt;
      &lt;/TestPlan&gt;
      &lt;hashTree&gt;
        &lt;ThreadGroup enabled="true"&gt;
          &lt;elementProp name="ThreadGroup.main_controller" elementType="LoopController" enabled="true"&gt;
            &lt;boolProp name="LoopController.continue_forever"&gt;false&lt;/boolProp&gt;
            &lt;intProp name="LoopController.loops"&gt;1&lt;/intProp&gt;
          &lt;/elementProp&gt;
        &lt;/ThreadGroup&gt;
        &lt;hashTree&gt;
          &lt;GenericController guiclass="LogicControllerGui" testname="1 /index.html" enabled="true"/&gt;
          &lt;hashTree&gt;
            &lt;HTTPSamplerProxy guiclass="HttpTestSampleGui" testname="1 /index.html" enabled="true"&gt;
              &lt;elementProp name="HTTPsampler.Arguments" elementType="Arguments"&gt;
                &lt;collectionProp name="Arguments.arguments"/&gt;
              &lt;/elementProp&gt;
              &lt;stringProp name="HTTPSampler.implementation"&gt;HttpClient4&lt;/stringProp&gt;
              &lt;boolProp name="HTTPSampler.follow_redirects"&gt;true&lt;/boolProp&gt;
              &lt;boolProp name="HTTPSampler.use_keepalive"&gt;false&lt;/boolProp&gt;
              &lt;stringProp name="HTTPSampler.domain"&gt;webforumtestsolutions.co.uk&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.method"&gt;GET&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.port"&gt;0&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.protocol"&gt;http&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.path"&gt;/index.html&lt;/stringProp&gt;
              &lt;elementProp name="HTTPSampler.header_manager" elementType="HeaderManager" guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"&gt;
                &lt;collectionProp name="HeaderManager.headers"&gt;
                  &lt;elementProp name="Cache-Control" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Cache-Control&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;no-cache&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="Accept-Encoding" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Accept-Encoding&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;gzip&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="Pragma" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Pragma&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;no-cache&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="User-Agent" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;User-Agent&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="Accept" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Accept&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                &lt;/collectionProp&gt;
              &lt;/elementProp&gt;
              &lt;boolProp name="HTTPSampler.auto_redirects"&gt;false&lt;/boolProp&gt;
            &lt;/HTTPSamplerProxy&gt;
            &lt;hashTree&gt;
              &lt;HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"&gt;
                &lt;collectionProp reference="../../../HTTPSamplerProxy/elementProp[2]/collectionProp"/&gt;
              &lt;/HeaderManager&gt;
              &lt;hashTree/&gt;
            &lt;/hashTree&gt;
          &lt;/hashTree&gt;
          &lt;GenericController guiclass="LogicControllerGui" testname="2 /index.html" enabled="true"/&gt;
          &lt;hashTree&gt;
            &lt;HTTPSamplerProxy guiclass="HttpTestSampleGui" testname="2 /index.html" enabled="true"&gt;
              &lt;elementProp name="HTTPsampler.Arguments" elementType="Arguments"&gt;
                &lt;collectionProp name="Arguments.arguments"/&gt;
              &lt;/elementProp&gt;
              &lt;stringProp name="HTTPSampler.implementation"&gt;HttpClient4&lt;/stringProp&gt;
              &lt;boolProp name="HTTPSampler.follow_redirects"&gt;true&lt;/boolProp&gt;
              &lt;boolProp name="HTTPSampler.use_keepalive"&gt;false&lt;/boolProp&gt;
              &lt;stringProp name="HTTPSampler.domain"&gt;webforumtestsolutions.co.uk&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.method"&gt;GET&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.port"&gt;0&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.protocol"&gt;http&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.path"&gt;/index.html&lt;/stringProp&gt;
              &lt;elementProp name="HTTPSampler.header_manager" elementType="HeaderManager" guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"&gt;
                &lt;collectionProp name="HeaderManager.headers"&gt;
                  &lt;elementProp name="Cache-Control" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Cache-Control&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;no-cache&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="Accept-Encoding" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Accept-Encoding&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;gzip&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="Pragma" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Pragma&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;no-cache&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="User-Agent" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;User-Agent&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="Accept" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Accept&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                &lt;/collectionProp&gt;
              &lt;/elementProp&gt;
              &lt;boolProp name="HTTPSampler.auto_redirects"&gt;false&lt;/boolProp&gt;
            &lt;/HTTPSamplerProxy&gt;
            &lt;hashTree&gt;
              &lt;HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"&gt;
                &lt;collectionProp reference="../../../HTTPSamplerProxy/elementProp[2]/collectionProp"/&gt;
              &lt;/HeaderManager&gt;
              &lt;hashTree/&gt;
            &lt;/hashTree&gt;
          &lt;/hashTree&gt;
          &lt;GenericController guiclass="LogicControllerGui" testname="3 /toolsets.html" enabled="true"/&gt;
          &lt;hashTree&gt;
            &lt;HTTPSamplerProxy guiclass="HttpTestSampleGui" testname="3 /toolsets.html" enabled="true"&gt;
              &lt;elementProp name="HTTPsampler.Arguments" elementType="Arguments"&gt;
                &lt;collectionProp name="Arguments.arguments"/&gt;
              &lt;/elementProp&gt;
              &lt;stringProp name="HTTPSampler.implementation"&gt;HttpClient4&lt;/stringProp&gt;
              &lt;boolProp name="HTTPSampler.follow_redirects"&gt;true&lt;/boolProp&gt;
              &lt;boolProp name="HTTPSampler.use_keepalive"&gt;false&lt;/boolProp&gt;
              &lt;stringProp name="HTTPSampler.domain"&gt;webforumtestsolutions.co.uk&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.method"&gt;GET&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.port"&gt;0&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.protocol"&gt;http&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.path"&gt;/toolsets.html&lt;/stringProp&gt;
              &lt;elementProp name="HTTPSampler.header_manager" elementType="HeaderManager" guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"&gt;
                &lt;collectionProp name="HeaderManager.headers"&gt;
                  &lt;elementProp name="Cache-Control" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Cache-Control&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;no-cache&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="Accept-Encoding" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Accept-Encoding&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;gzip&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="Pragma" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Pragma&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;no-cache&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="User-Agent" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;User-Agent&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="Accept" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Accept&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                &lt;/collectionProp&gt;
              &lt;/elementProp&gt;
              &lt;boolProp name="HTTPSampler.auto_redirects"&gt;false&lt;/boolProp&gt;
            &lt;/HTTPSamplerProxy&gt;
            &lt;hashTree&gt;
              &lt;HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"&gt;
                &lt;collectionProp reference="../../../HTTPSamplerProxy/elementProp[2]/collectionProp"/&gt;
              &lt;/HeaderManager&gt;
              &lt;hashTree/&gt;
            &lt;/hashTree&gt;
          &lt;/hashTree&gt;
          &lt;GenericController guiclass="LogicControllerGui" testname="4 /internet-of-things.html" enabled="true"/&gt;
          &lt;hashTree&gt;
            &lt;HTTPSamplerProxy guiclass="HttpTestSampleGui" testname="4 /internet-of-things.html" enabled="true"&gt;
              &lt;elementProp name="HTTPsampler.Arguments" elementType="Arguments"&gt;
                &lt;collectionProp name="Arguments.arguments"/&gt;
              &lt;/elementProp&gt;
              &lt;stringProp name="HTTPSampler.implementation"&gt;HttpClient4&lt;/stringProp&gt;
              &lt;boolProp name="HTTPSampler.follow_redirects"&gt;true&lt;/boolProp&gt;
              &lt;boolProp name="HTTPSampler.use_keepalive"&gt;false&lt;/boolProp&gt;
              &lt;stringProp name="HTTPSampler.domain"&gt;webforumtestsolutions.co.uk&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.method"&gt;GET&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.port"&gt;0&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.protocol"&gt;http&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.path"&gt;/internet-of-things.html&lt;/stringProp&gt;
              &lt;elementProp name="HTTPSampler.header_manager" elementType="HeaderManager" guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"&gt;
                &lt;collectionProp name="HeaderManager.headers"&gt;
                  &lt;elementProp name="Cache-Control" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Cache-Control&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;no-cache&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="Accept-Encoding" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Accept-Encoding&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;gzip&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="Pragma" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Pragma&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;no-cache&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="User-Agent" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;User-Agent&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="Accept" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Accept&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                &lt;/collectionProp&gt;
              &lt;/elementProp&gt;
              &lt;boolProp name="HTTPSampler.auto_redirects"&gt;false&lt;/boolProp&gt;
            &lt;/HTTPSamplerProxy&gt;
            &lt;hashTree&gt;
              &lt;HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"&gt;
                &lt;collectionProp reference="../../../HTTPSamplerProxy/elementProp[2]/collectionProp"/&gt;
              &lt;/HeaderManager&gt;
              &lt;hashTree/&gt;
            &lt;/hashTree&gt;
          &lt;/hashTree&gt;
          &lt;GenericController guiclass="LogicControllerGui" testname="5 /services.html" enabled="true"/&gt;
          &lt;hashTree&gt;
            &lt;HTTPSamplerProxy guiclass="HttpTestSampleGui" testname="5 /services.html" enabled="true"&gt;
              &lt;elementProp name="HTTPsampler.Arguments" elementType="Arguments"&gt;
                &lt;collectionProp name="Arguments.arguments"/&gt;
              &lt;/elementProp&gt;
              &lt;stringProp name="HTTPSampler.implementation"&gt;HttpClient4&lt;/stringProp&gt;
              &lt;boolProp name="HTTPSampler.follow_redirects"&gt;true&lt;/boolProp&gt;
              &lt;boolProp name="HTTPSampler.use_keepalive"&gt;false&lt;/boolProp&gt;
              &lt;stringProp name="HTTPSampler.domain"&gt;webforumtestsolutions.co.uk&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.method"&gt;GET&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.port"&gt;0&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.protocol"&gt;http&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.path"&gt;/services.html&lt;/stringProp&gt;
              &lt;elementProp name="HTTPSampler.header_manager" elementType="HeaderManager" guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"&gt;
                &lt;collectionProp name="HeaderManager.headers"&gt;
                  &lt;elementProp name="Cache-Control" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Cache-Control&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;no-cache&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="Accept-Encoding" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Accept-Encoding&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;gzip&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="Pragma" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Pragma&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;no-cache&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="User-Agent" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;User-Agent&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="Accept" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Accept&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                &lt;/collectionProp&gt;
              &lt;/elementProp&gt;
              &lt;boolProp name="HTTPSampler.auto_redirects"&gt;false&lt;/boolProp&gt;
            &lt;/HTTPSamplerProxy&gt;
            &lt;hashTree&gt;
              &lt;HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"&gt;
                &lt;collectionProp reference="../../../HTTPSamplerProxy/elementProp[2]/collectionProp"/&gt;
              &lt;/HeaderManager&gt;
              &lt;hashTree/&gt;
            &lt;/hashTree&gt;
          &lt;/hashTree&gt;
          &lt;GenericController guiclass="LogicControllerGui" testname="6 /contact-us.html" enabled="true"/&gt;
          &lt;hashTree&gt;
            &lt;HTTPSamplerProxy guiclass="HttpTestSampleGui" testname="6 /contact-us.html" enabled="true"&gt;
              &lt;elementProp name="HTTPsampler.Arguments" elementType="Arguments"&gt;
                &lt;collectionProp name="Arguments.arguments"/&gt;
              &lt;/elementProp&gt;
              &lt;stringProp name="HTTPSampler.implementation"&gt;HttpClient4&lt;/stringProp&gt;
              &lt;boolProp name="HTTPSampler.follow_redirects"&gt;true&lt;/boolProp&gt;
              &lt;boolProp name="HTTPSampler.use_keepalive"&gt;false&lt;/boolProp&gt;
              &lt;stringProp name="HTTPSampler.domain"&gt;webforumtestsolutions.co.uk&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.method"&gt;GET&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.port"&gt;0&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.protocol"&gt;http&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.path"&gt;/contact-us.html&lt;/stringProp&gt;
              &lt;elementProp name="HTTPSampler.header_manager" elementType="HeaderManager" guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"&gt;
                &lt;collectionProp name="HeaderManager.headers"&gt;
                  &lt;elementProp name="Cache-Control" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Cache-Control&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;no-cache&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="Accept-Encoding" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Accept-Encoding&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;gzip&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="Pragma" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Pragma&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;no-cache&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="User-Agent" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;User-Agent&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="Accept" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Accept&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                &lt;/collectionProp&gt;
              &lt;/elementProp&gt;
              &lt;boolProp name="HTTPSampler.auto_redirects"&gt;false&lt;/boolProp&gt;
            &lt;/HTTPSamplerProxy&gt;
            &lt;hashTree&gt;
              &lt;HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"&gt;
                &lt;collectionProp reference="../../../HTTPSamplerProxy/elementProp[2]/collectionProp"/&gt;
              &lt;/HeaderManager&gt;
              &lt;hashTree/&gt;
            &lt;/hashTree&gt;
          &lt;/hashTree&gt;
          &lt;GenericController guiclass="LogicControllerGui" testname="7 /test-planning.html" enabled="true"/&gt;
          &lt;hashTree&gt;
            &lt;HTTPSamplerProxy guiclass="HttpTestSampleGui" testname="7 /test-planning.html" enabled="true"&gt;
              &lt;elementProp name="HTTPsampler.Arguments" elementType="Arguments"&gt;
                &lt;collectionProp name="Arguments.arguments"/&gt;
              &lt;/elementProp&gt;
              &lt;stringProp name="HTTPSampler.implementation"&gt;HttpClient4&lt;/stringProp&gt;
              &lt;boolProp name="HTTPSampler.follow_redirects"&gt;true&lt;/boolProp&gt;
              &lt;boolProp name="HTTPSampler.use_keepalive"&gt;false&lt;/boolProp&gt;
              &lt;stringProp name="HTTPSampler.domain"&gt;webforumtestsolutions.co.uk&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.method"&gt;GET&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.port"&gt;0&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.protocol"&gt;http&lt;/stringProp&gt;
              &lt;stringProp name="HTTPSampler.path"&gt;/test-planning.html&lt;/stringProp&gt;
              &lt;elementProp name="HTTPSampler.header_manager" elementType="HeaderManager" guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"&gt;
                &lt;collectionProp name="HeaderManager.headers"&gt;
                  &lt;elementProp name="Cache-Control" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Cache-Control&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;no-cache&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="Accept-Encoding" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Accept-Encoding&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;gzip&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="Pragma" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Pragma&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;no-cache&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="User-Agent" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;User-Agent&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                  &lt;elementProp name="Accept" elementType="Header"&gt;
                    &lt;stringProp name="Header.name"&gt;Accept&lt;/stringProp&gt;
                    &lt;stringProp name="Header.value"&gt;text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2&lt;/stringProp&gt;
                  &lt;/elementProp&gt;
                &lt;/collectionProp&gt;
              &lt;/elementProp&gt;
              &lt;boolProp name="HTTPSampler.auto_redirects"&gt;false&lt;/boolProp&gt;
            &lt;/HTTPSamplerProxy&gt;
            &lt;hashTree&gt;
              &lt;HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"&gt;
                &lt;collectionProp reference="../../../HTTPSamplerProxy/elementProp[2]/collectionProp"/&gt;
              &lt;/HeaderManager&gt;
              &lt;hashTree/&gt;
            &lt;/hashTree&gt;
          &lt;/hashTree&gt;
        &lt;/hashTree&gt;
      &lt;/hashTree&gt;
    &lt;/hashTree&gt;
  &lt;/jmeterTestPlan&gt;
  </code></pre>
  
  <p><strong>XSLT</strong></p>
  
  <pre><code>&lt;?xml version='1.0'?&gt;
  &lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"&gt;
     &lt;xsl:output method="xml"/&gt;
  &lt;xsl:variable name="doc-file"&gt;http://mymachine.com/changed.xml&lt;/xsl:variable&gt;
  &lt;xsl:template match="//HTTPSamplerProxy"&gt;
     &lt;xsl:copy&gt;&lt;xsl:copy-of select="* | node()"/&gt;&lt;/xsl:copy&gt;
  &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p><strong>Result</strong></p>
  
  <pre><code>  false
    false
        false
        1
  
  
  
  
  
        &lt;HTTPSamplerProxy&gt;
          &lt;elementProp name="HTTPsampler.Arguments" elementType="Arguments"&gt;
            &lt;collectionProp name="Arguments.arguments"/&gt;
          &lt;/elementProp&gt;
          &lt;stringProp name="HTTPSampler.implementation"&gt;HttpClient4&lt;/stringProp&gt;
          &lt;boolProp name="HTTPSampler.follow_redirects"&gt;true&lt;/boolProp&gt;
          &lt;boolProp name="HTTPSampler.use_keepalive"&gt;false&lt;/boolProp&gt;
          &lt;stringProp name="HTTPSampler.domain"&gt;webforumtestsolutions.co.uk&lt;/stringProp&gt;
          &lt;stringProp name="HTTPSampler.method"&gt;GET&lt;/stringProp&gt;
          &lt;stringProp name="HTTPSampler.port"&gt;0&lt;/stringProp&gt;
          &lt;stringProp name="HTTPSampler.protocol"&gt;http&lt;/stringProp&gt;
          &lt;stringProp name="HTTPSampler.path"&gt;/index.html&lt;/stringProp&gt;
          &lt;elementProp name="HTTPSampler.header_manager"
              elementType="HeaderManager"
              guiclass="HeaderPanel"
              testclass="HeaderManager"
              testname="HTTP Header Manager"
              enabled="true"&gt;
            &lt;collectionProp name="HeaderManager.headers"&gt;
              &lt;elementProp name="Cache-Control" elementType="Header"&gt;
                &lt;stringProp name="Header.name"&gt;Cache-Control&lt;/stringProp&gt;
                &lt;stringProp name="Header.value"&gt;no-cache&lt;/stringProp&gt;
              &lt;/elementProp&gt;
              &lt;elementProp name="Accept-Encoding" elementType="Header"&gt;
                &lt;stringProp name="Header.name"&gt;Accept-Encoding&lt;/stringProp&gt;
                &lt;stringProp name="Header.value"&gt;gzip&lt;/stringProp&gt;
              &lt;/elementProp&gt;
              &lt;elementProp name="Pragma" elementType="Header"&gt;
                &lt;stringProp name="Header.name"&gt;Pragma&lt;/stringProp&gt;
                &lt;stringProp name="Header.value"&gt;no-cache&lt;/stringProp&gt;
              &lt;/elementProp&gt;
              &lt;elementProp name="User-Agent" elementType="Header"&gt;
                &lt;stringProp name="Header.name"&gt;User-Agent&lt;/stringProp&gt;
                &lt;stringProp name="Header.value"&gt;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1&lt;/stringProp&gt;
              &lt;/elementProp&gt;
              &lt;elementProp name="Accept" elementType="Header"&gt;
                &lt;stringProp name="Header.name"&gt;Accept&lt;/stringProp&gt;
                &lt;stringProp name="Header.value"&gt;text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2&lt;/stringProp&gt;
              &lt;/elementProp&gt;
            &lt;/collectionProp&gt;
          &lt;/elementProp&gt;
          &lt;boolProp name="HTTPSampler.auto_redirects"&gt;false&lt;/boolProp&gt;
        &lt;/HTTPSamplerProxy&gt;
  
  
  ... Other &lt;HTTPSamplerProxy&gt;&lt;/HTTPSamplerProxy&gt; tags
  </code></pre>
  
  <p>You can try it <a href="https://www.freeformatter.com/xsl-transformer.html" rel="nofollow noreferrer">here</a>. I just donot want <code>false</code> and <code>1</code> in my output.</p>