Convert Actual XML in url encoded ascii format

I am using REST API for our performance testing. Once we are able to deal with SLL we have to send the actual XML in server accepting format.

 Server is design in that way it will accept only url encoded ascii format. So, we have to convert actual xml to url encoded ascii format and replace "\\ " with " ". 

Below piece of code we are uinsg while automation.
 "XML=" (, "ASCII").replace("\\ ", " ")).trim();

Can any one help me how to perform same task through LR Scripting.


  • You can use the function web_convert_param(), take as target encoding URL.

    When you want to convert a ' ' to in the result you have to manually fix that with some C functions.

    You might not need that, depending on how you perform your decoding at your server. When your server is using, you will be fine.