>
> Michael, what is a "semantic data model"?
A semantic data model tells you how the items in your data relate to things in the real world. An XML document might have a <product> element, but it doesn't tell you what a product is - and it's always more complicated than you think (for example, if you put your cornflakes in a Christmas-themed package one week, does that make it a different product?).
> Would you give an example of a semantic data model for XML and an example of a semantic data model for JSON, please?
You're putting the cart before the horse. You create a semantic data model for a problem domain (for example, in UML), and then you define XML or JSON representations of the data in that domain. The conceptual data model comes first, the concrete realisations come second.
Except you cannot generally do that because there is an impedance mismatch between JSON and UML meaning you cannot faithfully represent a UML model in JSON
> How are their semantic data models used to transform XML to JSON and vice versa?
>
You design an XML representation of the data model, and you design a JSON representation of the data model, and then you work out how they relate to each other, by referring back to the data model.
Except you cannot generally do that because XML and JSON are not representationally equivalent so an XML model translated to JSON will be lossy.