From: Jamie J. <jam...@gm...> - 2014-10-07 22:21:59
|
Hi Folks, In version control, I am storing some XML configuration documents that are machine-generated. The machine sometimes arbitrarily changes the order of some elements, and that leads to spurious diffs. I'd like to scrub those files as part of my config downloading routines by introducing certain sorts. (I don't much care what they are, as long as they're consistent. Ascending alphabetic sort, based on some specified XPath level would be fine.) Can XMLStarlet update XML with sorted elements? (Or is some other utility more appropriate?) If it's easy, I'll probably implement it; otherwise, I'll probably learn to live with the spurious diffs. Thanks, Jamie |