Why do we use XML
We need to translate from one specification language A to another specification language B in order to use tools that are available for B but do not exist for A. Using the tools for B, we can find that our specification is good or we can find a problem in the specification. If the specification is good, we can stop our work. If we need to improve our specification, we have 2 options: a) to fix B until we get a good specification and then translate it back to A or, b) knowing the problematic area in B find its source in A, fix it and run a new cycle. In either case we need to go backward from B to A, but the translation from A to B may be non-reversible (e.g., if A supports loops and B doesn't). We must keep track of all the structures we lose during the translation. We chose to translate every specification language to its XML representation, adding to every element an ID (sequential number). Now we can keep the connection between the source elements and the elements at the destination, making the translation reversible.
I will try do demonstrate this in a diagram.
Suppose we translate specification from A to B., and suppose that x is translated to X, y to Y and z to Z
Now using the tools of B we finds a problem in Y and change it to Y'
And the final step would be to translate back from B to A preserving the original x & z.



![]()
![]()
![]()
![]()




![]()
![]()
![]()
![]()

