How to search and remove elements with the same name

Questions about XML that are not covered by the other forums should go here.
boufon
Posts: 1
Joined: Fri Jan 26, 2018 12:42 pm

How to search and remove elements with the same name

Post by boufon »

Hi

Hopefully someone can help. I'm no expert with Xml.

I'm importing several xml docs into InDesign.
The problem I'm having is that there are several Elements with the same name, where I only need the first instance.
Below is the basic structure

Entry

Change Counrty

Address

Contact

Contact

Contact

Other information

Entry

Is there a way to search and remove the other elements of 'Contact' e.g Contact [2] other than manually deleting them.
As I say I'm no coder but would really appreciate the help if anyone can.

Big thanks

Pete