Just another perl hacker somewhere near Disneyland
I've found a workaround for one of yesterday's annoyances, at least the one where a "folder compare" function (not really a file directory) in Informatica PowerCenter doesn't really compare everything in the folders. You can export folders as XML documents, so that's what I did, and then used XML::Diff to compare the documents.
Except that some of the elements in one document are not in the same order as the other document, and although I don't care, XML::Diff does. There are some commercial tools that will compare unordered XML elements, and I ran across one that I guess was free but is no longer.
So it was XML::Filter::Sort to the rescue (thank you grantm - and all the other XML folks), and I just sorted all the elements where I didn't care about the order, and then diffed the results. Several of the elements where just sorted by the name attribute, so I made a bunch of sorters in one go:(Updated code: Needed "./" prefix on NAME)
my @sorters = (
Record => $_,
Keys => [ ['./@NAME'] ],
I also wrote my first actual XML::SAX parser for the task of deleting some attributes where I didn't care about differences in values.
And some of the attributes had encoded control
characters in them e.g.