Get attribute of a xml by comparing two xml data
<p>I`m trying to get the attribute value of a xml by comparing it to <strong>another xml</strong>,as follows:</p>

<p><strong>xmlData1</strong> variable has xml like---></p>

<pre><code>&lt;Root&gt;
  &lt;RNA A="100" x="table1" y="car11"/&gt;
  &lt;RNA A="101" x="table2" y="car12"/&gt;
  &lt;RNA A="102" x="table3" y="car13"/&gt;
  &lt;RNA A="103" x="table4" y="car14"/&gt;
  &lt;RNA A="104" x="table5" y="car15"/&gt;
  &lt;RNA A="105" x="table6" y="car16"/&gt;
  &lt;RNA A="106" x="table7" y="car17"/&gt;
  &lt;RNA A="107" x="table8" y="car18"/&gt;
  &lt;RNA A="108" x="table9" y="car19"/&gt;
&lt;/Root&gt;
</code></pre>

<p><strong>xmlData2</strong> variable has xml like ---></p>

<pre><code>&lt;Ina&gt;
  &lt;RNA B="100" x="table1" y="car11"/&gt;
  &lt;RNA B="101" x="table2" y="car12"/&gt;
  &lt;RNA B="102" x="table3" y="car13"/&gt;
&lt;/Ina&gt;
</code></pre>

<p>Here i `ve to compare like </p>

<pre><code>if(xmlData1.getAttribute(x)==xmlData2.getAttribute(x) then
//code goes
</code></pre>

<p>How to achive this???please help</p>
