How to Map the results of DB Query to an XML of predefined s

My requirement is that I need to execute a query in the database and the results of the query should finally be transformed into an XML. The format of this XML is available with me.

I created the DBservice for execution of the query. I also loaded the XML output format as a record. Now in my flow service I executed the DBService but im unable to transform the results into the XML format that I want
eg the result set I get from the DB Service (after taking a join from the POMaster and POLineItem Table) is
PO, PODATE, POITEM, POITEMQTY. The XML format that i want at the output is

How do I achieve this DBResults to XML mapping ?