There are advantages and disadvantages in combination with personal style, tools (their default configurations, restrictions or ease of use), it is necessary to support several MIME types from one object representation, etc. I am not going to go into all of that - because what works for some may not be a good solution for others, but I just want to point out a few things ...
Which one seems more natural, flat elements or wrapped elements? How do people usually think of repeating elements? For example, <manufature> , <price> and <description> enclosed in a <car> element. What for? Because they are connected and together form a structure. Several <car> also related and form a structure: a list of <car> s. This is more expressive in your presentation and XML schema and more readable. But, of course, now we are going into personal preferences and whole wars ...
There is another advantage to the wrapped element. How do you express a list of cars that is empty and a list of cars that is null?
If the elements are flat and you donβt have cars, then what does this mean when you unplug it into an object?
<carRequest> </carRequest>
Does your request cars = null or cars = [] ? You do not know.
If you go with nested elements, then cars = null :
<carRequest> </carRequest>
while cars = [] :
<carRequest> <cars> </cars> </carRequest>
And since you mentioned SOAP, at some point you will need to consider the interoperability between technologies and tools (see Why is it important to be compatible with the WS-I base profile? ), Which has rules on how XML should look in a SOAP message . A style called a wrapped document document / literal is recommended .
It is a broad subject and like a TL; DR I can only think of "pick your poison . " Hope my answer helps you.