Is possible to get elements from XML using Notepad++ Regex? : <p>I have an XML with different <code>Item</code>'s which may contain the attribute <code>Setting</code> named <code>SerialNumber</code>. Im trying to get all the item names followed with the serial number.</p>

<p>My approch is using Notepad++ Regex, to get the name of the <code>Item</code> and the value of the attribute <code>Setting</code> named <code>SerialNumber</code>something like this:</p>

<blockquote>
  <p>Sender0;3990  Sender3;4444  Sender4;7774</p>
</blockquote>

<p>But trying it the only thing i can get is that notepad++ selects all the text... My fast approach was something like this: </p>

<pre><code>^&lt;Item Name="(.*)" Category=".*&lt;Setting Name="SerialNumber"&gt;(.*)&lt;/Setting&gt;.*&lt;/Item&gt;
</code></pre>

<p>And replace:</p>

<pre><code>(\1);(\2)
</code></pre>

<p>The XML:</p>

<pre><code>    &lt;Item Name="Sender0" Category="" ClassName="Cars" Schedule="" Enabled="true"&gt;
     &lt;Setting&gt;...&lt;/Setting&gt;
     &lt;Setting Name="SerialNumber"&gt;3990&lt;/Setting&gt;
     &lt;Setting&gt;...&lt;/Setting&gt;
    &lt;/Item&gt;
    &lt;Item Name="Sender1" Category="" ClassName="Cars" Schedule="" Enabled="true"&gt;
     &lt;Setting&gt;...&lt;/Setting&gt;
     &lt;Setting&gt;...&lt;/Setting&gt;
     &lt;Setting&gt;...&lt;/Setting&gt;
    &lt;/Item&gt;
    &lt;Item Name="Sender2" Category="" ClassName="Cars" Schedule="" Enabled="true"&gt;
     &lt;Setting&gt;...&lt;/Setting&gt;
     &lt;Setting&gt;...&lt;/Setting&gt;
     &lt;Setting&gt;...&lt;/Setting&gt;
    &lt;/Item&gt;
    &lt;Item Name="Sender3" Category="" ClassName="Cars" Schedule="" Enabled="true"&gt;
     &lt;Setting&gt;...&lt;/Setting&gt;
     &lt;Setting Name="SerialNumber"&gt;4444&lt;/Setting&gt;
     &lt;Setting&gt;...&lt;/Setting&gt;
    &lt;/Item&gt;
    &lt;Item Name="Sender4" Category="" ClassName="Cars" Schedule="" Enabled="true"&gt;
     &lt;Setting&gt;...&lt;/Setting&gt;
     &lt;Setting Name="SerialNumber"&gt;7774&lt;/Setting&gt;
     &lt;Setting&gt;...&lt;/Setting&gt;
    &lt;/Item&gt;
</code></pre>

<p>Hope you can help me, thanks :)</p>
