in reply to Extracting tagged data from a XML file

If you have installed XML::Twig you can use the xml_grep utility that comes with it:

xml_grep -t -cond 'IP-ADDRESS' -cond 'IP-NEIGHBOUR'  test_xml_grep.xml | sort -u

-t is the option that will give you only the text of the results, not the tags, and of course sort -u will them give you the list of unique IPs.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.