> These fragments have repeating elements, and I worry that parsers / writers may rewrite the fragments such that the order of their sub elements may change, making comparison difficult. Is this a valid concern, and what can I do about it?
in general any software can do anything but an xml parser on its own
won't do that. You don't give much context but the question sounds the
same as asking if you mark up a novel with every paragraph in
<p>..</p> whether an xml parser would shuffle the text around or keep
the novel intact?
David