BeforeOperations Rule for XML Body Updation

Hi,

I would like to implement a WebServiceBeforeOperationRule rule to replace a body request before pagination.

I’ve reviewed the following link to take some examples: Web Services Before/After Operation Rule - Compass (sailpoint.com) but when i tried the below code but body is not getting updated.

Map bodyMap = new HashMap();
bodyMap.put(“bodyFormat”, “raw”);
String xmlBody = “<?xml version=\"1.0\"?> <Test> <value>1</value></Test>”;
bodyMap.put(“jsonBody”, xmlBody);
requestEndPoint.setBody(bodyMap);

Please let me know if the < and > needs to be replaced with any special encoding format?

Thanks in advance