Parse XML string in routing strategy

Hi !
In ounr email enviromment we get a sting in “xml-format”.

Ex:
FORWARD

What I need to do is to update the key .(ex change FORWARD to REPLY).
Dont’t find any function in Sting maipulation to do this in a good way.

Using routing 7.6.

Anyone got any ideas.

Regards Mikael

Hi Mikael,

As you know there are no functions related to XML available in IRD. If you need just change value of one parameter then I would use StrReplace function (StrReplace[,‘FORWARD’,‘REPLY’]). I know it isn’t “elegant” solution but it should work. if you don’t know initial value of the key “ActionCode” then you would need to do some string parsing (using IRD functions StrChar and StrSub).

R.

1 Like

I think it would be best to write your own subroutine to do this. As René says, you’re going to have to use the string manipulation functions to make it work.

2 Likes

Thanks, hpofylle somewhere in the future this would be included now when we have soap in the system this will be more and more used i guess.
I will post my solution here soon.
/ Micke

Hi !
Here comes my solution, it’s not pretty but it does the job. :wink:

It’s a strategy that will be converted to a subroutine that takes teh xml-sting, tag to be updated and value.

Regards
Micke