I have an XML with different Item's which may contain the attribute Setting named SerialNumber. Im trying to get all the item names followed with the serial number.
My approch is using Notepad++ Regex, to get the name of the Item and the value of the attribute Setting named SerialNumbersomething like this:
Sender0;3990 Sender3;4444 Sender4;7774
But trying it the only thing i can get is that notepad++ selects all the text... My fast approach was something like this:
^<Item Name="(.*)" Category=".*<Setting Name="SerialNumber">(.*)</Setting>.*</Item>
And replace:
(\1);(\2)
The XML:
<Item Name="Sender0" Category="" ClassName="Cars" Schedule="" Enabled="true">
<Setting>...</Setting>
<Setting Name="SerialNumber">3990</Setting>
<Setting>...</Setting>
</Item>
<Item Name="Sender1" Category="" ClassName="Cars" Schedule="" Enabled="true">
<Setting>...</Setting>
<Setting>...</Setting>
<Setting>...</Setting>
</Item>
<Item Name="Sender2" Category="" ClassName="Cars" Schedule="" Enabled="true">
<Setting>...</Setting>
<Setting>...</Setting>
<Setting>...</Setting>
</Item>
<Item Name="Sender3" Category="" ClassName="Cars" Schedule="" Enabled="true">
<Setting>...</Setting>
<Setting Name="SerialNumber">4444</Setting>
<Setting>...</Setting>
</Item>
<Item Name="Sender4" Category="" ClassName="Cars" Schedule="" Enabled="true">
<Setting>...</Setting>
<Setting Name="SerialNumber">7774</Setting>
<Setting>...</Setting>
</Item>
Hope you can help me, thanks :)