Posted inSAP ABAP
Generate an xml file by ABAP
https://sapintegrationhub.com/abap/transformation/xml-transformation-example-xslt_tool/ Another sample with encoding: http://sapblog.rmtiwari.com/2012/05/simple-transformation-for-xml-in-abap.html