While SAP is not exactly cutting edge they have been adding some features to ABAP (their proprietary language) that you would expect to find in a modern language.
For instance, in your example you could use the CALL TRANSFORMATION statement to convert your table directly to XML.
The problem is that you can still write code as you would have done in the 1970's and SAP won't complain.