Add an external node module to postman (xml2js)

Hello,

I would like to use xml-js in my pre-request script so that I can do this :

  • Parse an input xml file into a json object
  • Make modifications on it (like add different prefixes on elements, …)
  • Parse the json into a proper xml string
  • Set up the string as the body of the request

(I am well aware that xml2js is available but it doesn’t fit my needs)

I read many other posts (like this one Adding external libraries to postman - #7 by kunagpal ) but none of the proposed solutions worked for me.

Thanks in advance,

Hi @smals-jy95, Welcome to the community!

I have written one blog using this library. Please check it once :slight_smile: I have tried to be elaborative as much as possible.

I hope, this covers some of your use cases :slight_smile:

2 Likes