need your help in resolving below issue :
Below XML Structure we are able to generate where the data is linear with no grouping with respect to the Models.
however we need the output in below format by grouping the model attributes with respect to model number
we created below SQL query to generate the 1st XML but unable to generate the desired 2nd xml
Table data :

PLease help us ASAP.
regards, Sam