parsing XML file in MapReduce
<p>I have a list of XML files, which needs to be parsed using MR code.</p>

<p>A sample of the xml file is give below</p>

<pre><code>&lt;tns:envelope xmlns:tns="http://abcd.com/schemas/envelope/v3_0" xmlns:xsi="http://www.abcd.org/2001/XMLSchema-instance" version="3.0"&gt;
    &lt;tns:header&gt;
        &lt;tns:type&gt;response&lt;/tns:type&gt;
        &lt;tns:service&gt;
            &lt;tns:name&gt;Value1&lt;/tns:name&gt;
            &lt;tns:version&gt;3.0&lt;/tns:version&gt;
        &lt;/tns:service&gt;
        &lt;tns:originator&gt;Value2&lt;/tns:originator&gt;
        &lt;tns:businessProcessName&gt;Value3&lt;/tns:businessProcessName&gt;
        &lt;tns:sequenceNumber&gt;value3&lt;/tns:sequenceNumber&gt;
        &lt;tns:transactionReference&gt;abcdef12345&lt;/tns:transactionReference&gt;
        &lt;tns:expirationSeconds&gt;1200&lt;/tns:expirationSeconds&gt;
        &lt;tns:additionalParameters&gt;
            &lt;tns:param&gt;
                &lt;tns:name&gt;notificationURL&lt;/tns:name&gt;
                &lt;tns:value&gt;https://url1&lt;/tns:value&gt;
            &lt;/tns:param&gt;
            &lt;tns:param&gt;
                &lt;tns:name&gt;ConsumingCallbackURL&lt;/tns:name&gt;
                &lt;tns:value&gt;https://url2&lt;/tns:value&gt;
            &lt;/tns:param&gt;
        &lt;/tns:additionalParameters&gt;
        &lt;tns:result&gt;
            &lt;tns:status&gt;success&lt;/tns:status&gt;
            &lt;tns:provider&gt;ABC&lt;/tns:provider&gt;
        &lt;/tns:result&gt;
        &lt;tns:requestDateTime&gt;2016-02-16T08:12:17.827Z&lt;/tns:requestDateTime&gt;
    &lt;/tns:header&gt;
    &lt;tns:body&gt;&lt;/tns:body&gt;
&lt;/tns:envelope&gt;         
</code></pre>

<p>Now I have a configuration file where the interested tags which needs to be parsed are kept. Sample tag names given like below</p>

<pre><code>/envelope/version
/envelope/header/type
/envelope/header/service/name
/envelope/header/additionalParameters/param/name
/envelope/header/additionalParameters/param/value
</code></pre>

<p>The expected output will is like below</p>

<pre><code>/envelope/version /envelope/header/type /envelope/header/service/name /envelope/header/additionalParameters/param/name /envelope/header/additionalParameters/param/value
       3.0               response                   Value1                             notificationURL                                   https://url1
       3.0               response                   Value1                           ConsumingCallbackURL                                https://url2
</code></pre>

<p>Can I get a sample code to parse the XML and get the sample desired output.</p>