I want to extract the contents of fqdns from the following file, but only for each device where status is new:
<device id='10.72.48.215'>
<address>10.72.48.215</address>
<status>old</status>
<fqdns>10.72.48.215</fqdns>
<parent></parent>
<type>Unknown</type>
<ports>
</ports>
<operatingsystems>
</operatingsystems>
</device>
<device id='10.72.48.216'>
<address>10.72.48.216</address>
<status>new</status>
<fqdns>10.72.48.216</fqdns>
<parent></parent>
<type>Unknown</type>
<ports>
</ports>
<operatingsystems>
</operatingsystems>
</device>
So, for the above, I want to obtain 10.72.48.216 (and not 10.72.48.215).