Rank: Newbie
Joined: 1/30/2015 Posts: 1 Location: San Antonio
|
Does anyone know a way to search through several thousand xml files at once and have items flagged which contain a duplicate xml reference?
For instance, I need to know which xml files contain more than one reference of:
correct="true"
I need a way to do this without having to physically open each xml file and search manually for items where this reference is used more than one time.
Any help would be greatly appreciated.
|
Rank: Advanced Member
Joined: 12/13/2005 Posts: 2,856 Location: Mauritius
|
You can do it with XPath - you can apply it to a whole Project or a folder with files, so no need to open each file independently.
Your description of the reference is not clear, but assuming you are just looking for more than one concurrence of this pair, the XPath would be
count( //@correct[ . = 'true' ] )[ . > 1 ]
This will only output those files which have more than one pair correct="true" in it
|