XML Duplicates



  • Is there an easy way to search an xml file for duplicate entries? My file has over 20K entries and I need to make sure there is one an only one classname definition in the file for each classname.



  • @Lyoid-Fussell said in XML Duplicates:

    Is there an easy way to search an xml file for duplicate entries?

    Hard to say without example data. However one method could be to work on a copy of the file as this would be a destructive test.
    First remove all lines of code except the one you want to test on, assuming it contains lines rather than just lots of code all bunched together.Sort the lines so duplicates are together. A regular expression could easily spot duplicates.

    Note this is just a high level description. To provide an actual process requires you provide actual example data. To insert examples, first insert them into the posting window, then highlight them and press the </> button above. This puts a black box around the examples preventing the website from potentially mangling the data.

    Terry


Log in to reply