Can I use "Tests/Scripts" to modify a returned message response which in turn is used to post as a subsequent call?

I am using Postman as a middleman to GET from a vendor site because the vendor is still using the old DTD format and calls. I need to pass along the result to another vendor. But, this vendor uses a more modern integration and will not accept DTD.
I am able to get responses back from that old vendor site. Since this vendor still uses the DTD format, I need to delete the first 2 lines of the response every time and add in a templated element section at the top; along with 2 new lines at the bottom to close off the new elements.
My question is … can I use Postman’s Tests/Scripts to modify the response message automatically so that I do not have to manually update the result prior to sending it to the second vendor’s site?
I have attached a simple snippet of what needs to be altered in the old vendor’s result file.

********* Sample of the response shown below *********

<?xml version="1.0" encoding="ISO-8859-1"?>


********* End Sample of the response *********

********* Sample of the modifications shown below *********

<?xml version="1.0" encoding="UTF-8"?>




********* End Sample of the modifications *********

Any help would be greatly appreciated.
Thank you.