priyanthan
Programmer
I'm trying to extract certain values from XML tags.
for example i have the following XML
<Trans>Withd,Inq,TrfFrm</Trans>
I need to display
Withd
Inq
TrfFrm.
I tried this formula:
/*{@t2} = <Trans>Withd,Inq,TrfFrm</Trans> */
stringvar array Comms := split({@t2},"/><");
numbervar i;
numbervar j := ubound(Comms);
stringvar TStr := "";
for i := 2 to j do(
TStr:= TStr + extractstring(Comms,""," ")+chr(13));
if len(TStr)>= 2 then
left(TStr,len(TStr)-2) else
TStr
but the result is
Inq
TrfFrm
I'm missing the first string. i don't know what i'm missing here. can anyone please help me.
working with CR11 and db2.
for example i have the following XML
<Trans>Withd,Inq,TrfFrm</Trans>
I need to display
Withd
Inq
TrfFrm.
I tried this formula:
/*{@t2} = <Trans>Withd,Inq,TrfFrm</Trans> */
stringvar array Comms := split({@t2},"/><");
numbervar i;
numbervar j := ubound(Comms);
stringvar TStr := "";
for i := 2 to j do(
TStr:= TStr + extractstring(Comms,""," ")+chr(13));
if len(TStr)>= 2 then
left(TStr,len(TStr)-2) else
TStr
but the result is
Inq
TrfFrm
I'm missing the first string. i don't know what i'm missing here. can anyone please help me.
working with CR11 and db2.