Posted: Tue Oct 07, 2003 1:36 am Post subject: Copying part of MRM-XML input to XML output
Knight
Joined: 04 Apr 2002 Posts: 560 Location: Scotland
Hi,
I have an input message that is parsed by the MRM. I want to copy part of that message to the output as XML (not MRM-XML). However, I could do with some advice on how to do this. I have tried several methods but not all the subfields are being copied.
The relevant part of the input message (from a trace node) is:
Code:
(0x100001B)MRM = (
...
(0x1000013)MailMessage = (
(0x300000B)MailTo = 'vmcgloin@xyz.co.uk'
(0x300000B)MailFrom = 'abc@xyz.co.uk'
(0x300000B)MailSubject = 'This is a sample message'
(0x1000013)MailBody = (
(0x200000B) = 'This is a sample message body'
)
)
...
I have tried:
Code:
SET "OutputRoot"."XML"."MailMessage" = InputRoot.MRM."MailMessage";
which produces this output (losing the MailBody information)
SET C = CARDINALITY(InputRoot.MRM."MailMessage".*[]);
SET I = 1;
WHILE I < C DO
SET OutputRoot."XML"."MailMessage".*[I] = InputRoot.MRM."MailMessage".*[I];
SET I=I+1;
END WHILE;
which produces this output (losing the MailBody tag and data):
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