Sorting Identity Manager DriverSet XML

Sorting Identity Manager DriverSet XML

I often find myself trying to compare the full DriverSet XML between environments to ensure I copied all changes from and to each environment. This was a pretty tedious task because drivers and rules are listed in the XML in the order they were initially imported (I believe), and not much of that matches between my environments. So I would often have to manually sort the drivers, and then sometimes try to sort rules within drivers to make sure I could do a good comparison.

I got tired of doing this so I wrote a small Perl script that does the sorting for me. I've only tested it with my environments, so I don't know how well this would work in anyone else's DriverSet.

Once I run both XMLs I want to compare through the script, I can then compare the output with WinMerge or Notepad++. I'm sure a simple diff on the command line would work, but I like having the visual aid of those other tools, especially when trying to track down which driver a difference belongs to.

Tags (1)


Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Cool idea Joel - In my case, I used a stylesheet to simply alphabetize the sub rules, and this has mostly resolved the issue; and we call this process 'normalizing' before we check in drivers into our source code repository. The code looks pretty complicated, can I ask what sorting key you decided to use? Was it just arbitrary like alphabetizing like I did?
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2017-06-26 21:13
Updated by:
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.