title: How to pass xml as Json attribue in postman
body: <p>I am trying to write a really simple test in Postman. I have two URL and first url get some XML file and then store this in Postman varible as a pre script section.
  After that second URL uses this response and send a another request for Post. </p>
  
  <p>but after getting result from xml successfully , somehow postman does not pass this request and gives 400.</p>
  
  <pre><code>pm.environment.set('RandomNumber',  "cot"+Math.floor(Math.random() * 1000));
  pm.sendRequest("https://test/metadata.xml", function (err, response) {
  
      pm.environment.set('**RandomURLText**', response.text());
  });
  </code></pre>
  
  <p>RandomURLText varible store the value of first request. </p>
  
  <p>Second request body params looks like below code .</p>
  
  <pre><code>**{
      "idPType": "Test",
      "dontShowProgress": true,
      "dontIncludeRequestedAuthnContext": true,
      "nameIDFormat": "run:SAML:2.0:nameid-format:transient",
      "sigAlg": "http://www.w3.org/2001/04/xmldsig-more#rsa-a",
      "metadata": {
          "idpXml": "{{RandomURLText}}"
      }
  
  }**
  </code></pre>
  
  <p>is there any function postman who can transform this xml response data. Because second request say 400 when it add xml type data. But when I just replaced this responsetext to hello then its works.</p>
  
  <p>That's means something is wrong in xml type data , may be escape chars. </p>
  
  <p>could someone help me on this?</p>
  
  <p>Thanks</p>