X2SF README
Tools for analysis Salesforce metadata files after merging changes.
Features
1 - Find Duplicates
Find duplicate tags comparing tag name and text content
At this sample file, the tags <sorted>
and <customValue>
are duplicated
<?xml version="1.0" encoding="UTF-8"?>
<GlobalValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
<masterLabel>ExampleGlobalValueSet</masterLabel>
<description>This is an example Global Value Set</description>
<sorted>false</sorted> <!-- 1º <sorted> occur ::ok:: -->
<sorted>false</sorted> <!-- 2º <sorted> occur ::duplicity!:: -->
<customValue> <!-- 1º <customValue> occur ::ok:: -->
<fullName>Value1</fullName>
<default>false</default>
<label>Value 1</label>
</customValue>
<customValue>
<fullName>Value2</fullName>
<default>false</default>
<label>Value 2</label>
</customValue>
<customValue> <!-- 2º <customValue> occur ::duplicity!:: -->
<fullName>Value1</fullName>
<default>false</default>
<label>Value 1</label>
</customValue>
</GlobalValueSet>
A notification for each duplication are showed
and cursor are positioned at the first duplicity

2 - Remove Duplicates by Key Tag Path
Remove duplicate tags comparing key tag path input
At this sample file, the tag <customValue>
are duplicated
<?xml version="1.0" encoding="UTF-8"?>
<GlobalValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
<masterLabel>ExampleGlobalValueSet</masterLabel>
<description>This is an example Global Value Set</description>
<sorted>false</sorted>
<customValue> <!-- 1º <customValue> occur ::ok:: -->
<fullName>Value1</fullName>
<default>false</default>
<label>Value 1</label>
</customValue>
<customValue>
<fullName>Value2</fullName>
<default>false</default>
<label>Value 2</label>
</customValue>
<customValue> <!-- 2º <customValue> occur ::duplicity!:: -->
<fullName>Value1</fullName>
<default>false</default>
<label>Value 1</label>
</customValue>
</GlobalValueSet>
Input the key tag path to find duplicates

A notification for each duplication are showed

Only first occurrence stay in file
<?xml version="1.0" encoding="UTF-8"?>
<GlobalValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
<masterLabel>ExampleGlobalValueSet</masterLabel>
<description>This is an example Global Value Set</description>
<sorted>false</sorted>
<customValue> <!-- 1º <customValue> occur ::ok:: -->
<fullName>Value1</fullName>
<default>false</default>
<label>Value 1</label>
</customValue>
<customValue>
<fullName>Value2</fullName>
<default>false</default>
<label>Value 2</label>
</customValue>
</GlobalValueSet>
Release Notes
1.0.0
Add feature to find duplicates by tag path
0.0.1
Find Duplicates in the active xml file