Posted: Fri Oct 11, 2002 9:15 am Post subject: Implementing wild cards in the Input XML
Novice
Joined: 09 May 2002 Posts: 18
I need to extract the field from the transactioncode tag in the input XML where the tag before it could be anything (wildcard)
This syntax does not work
SET TranName = InputBody.xl_request.*.transactioncode;
I haven't completely thought this through, but hopefully it will inspire others to come up the full solution.
I think your answer might lie in something similar to the code used by the product to copy the headers:
DECLARE I INTEGER;
SET I = 1;
WHILE I < CARDINALITY(InputRoot.*[]) DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I=I+1;
END WHILE;
Additionally, you might want to be careful about your assignment statement. Since you are using wildcards, you could potentially be assigning a list to a scalar.
Hope that helps.....or at least inpires someone else to give better advice!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum