- Add the script to your Postman Package Library, call it whatever you'd like.
- Import it in any of your Postman scripts using
pm.require("package-name")
const { parse } = pm.require("xml"); // assuming package is named xml
const xmlResponseString = pm.response.text();