If it's an intermediate between two apps or databases, then pick the format that is easiest to process. Or, more likely, a compromise between easiest to generate and easiest to process. I imagine this is going to be more like your cross-reference format.
OTOH, if the XML data is more authoritative, I would say you can be more idealistic, which means the heirarchical format. I'd be wary of duplicated nodes with that, however, and how consuming code is supposed to deal with that.