Roger wrote...
> This way you minimize the need for schema changes.
You do, but you haven't justified here why that's a good thing.
It may be in some contexts, but conversely it might be better to have changes.
Your first XML naturally followed your data tree structure, so could be read by eye and, more realistically, a program to traverse the structure is likely to be simple and easily maintained and understood.
Conversely maintaining all your nodes as a flat list with a mapping applied is intrinsically harder to maintain, it is not really possible to see the structure of the data by looking at the xml.
Assuming your subject tree xml had some attributes denoting price, re-ordering the whole collection by price would just be a few lines of xslt (or whatever) so (at some cost in storage space) just doing that and then again having simple to maintain programs to navigate your grouped-by-price structure may be a win.
Of course you gave the example of two different tree structures, each of which could be simply modelled as xml element containment. If your relation is in fact more complicated and not a tree then something closer to your mapping structure is required, but that's using a more complicated structure because the data is more complicated, which isn't quite the slant that your description put on the choice.
Nothing's ever a black and white choice between good and bad (or flexible and inflexible as it's called here)
David