Here is the response i'm getting from my request :
<?xml version="1.0" encoding="UTF-8"?>
<session id="147xxxx"/>
I added this code to the tests tab of my request :
var XMLData = xml2Json(responseBody);
sessionId = pm.response.text("sessionId");
pm.environment.set("sessionId", sessionId);
It seems to work but all i'm getting is the entire response in my environment variable which is this :
<?xml version="1.0" encoding="UTF-8"?>
<session id="147xxxx"/>
But i only want the id in my environment variable.
Any ideas on how i could do this?