Thanks working now... Quoting Deepak Shetty <[email protected]>:
Hi You should probably use str = vars.get("MyVar"); str=str.replaceAll("<timestamp>111</timestamp>", "<timestamp>222<timestamp>"); regards deepak On Wed, Apr 7, 2010 at 1:01 PM, Deepak Shetty <[email protected]> wrote:if your code is literal then you havent closed the quote str = "${MyVar} Check if there are beanshell errors. if not check that you dont have any whitespace in the xml(or change the replace all to be a regexp that will match) regards deepak On Wed, Apr 7, 2010 at 12:49 PM, <[email protected]> wrote:Hi, I have a xml request, that I have saved in a variable. There is timestamp parameter that I need to update with system time. I understand that i can get time using time function, however I have to replace the value in the xml. for example <timestamp>111</timestamp> to be replaced with <timestamp>222<timestamp> Is there any way I can replace that value in the xml that is saved ${MyVar}. I tried using str = "${MyVar}; str=str.replaceAll("<timestamp>111</timestamp>", "<timestamp>222<timestamp>"); in beanshell sampler, but it looks like " need to escaped etc.. Any other solution? Thanks in advance.. Deepak Tiwari --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

