Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: Mikael Jansson on September 25, 2009, 07:53:36 AM
-
Hi !
In ounr email enviromment we get a sting in "xml-format".
Ex:
<TechnicalHeader><Reply-to></Reply-to><CustomerId></CustomerId><MailItemId></MailItemId><ActionCode>FORWARD</ActionCode><UserID></UserID><ChannelId></ChannelId></TechnicalHeader>
What I need to do is to update the key <ActionCode>.(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[<variable>,'<ActionCode>FORWARD</ActionCode>','<ActionCode>REPLY</ActionCode>']). 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.
-
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.
-
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. ;)
It's a strategy that will be converted to a subroutine that takes teh xml-sting, tag to be updated and value.
Regards
Micke