Posted: Wed Jul 06, 2005 6:04 am Post subject: XML attr getting conv to tags in NameValueData-MQRFH2 header
Newbie
Joined: 14 Jun 2005 Posts: 7 Location: India
Hi,
I wanted to know if my XML tag with attributes can be copied to a NameValueData field in the MQRFH2 header as it is present in the input XML.
Lets say for e.g. I have an XML tag as follows
<Input>
<Data id = "person" key = "123">
<name>ABC</name>
</Data>
</Input>
If I use the following ESQL code to copy the 'Data' tag to the output MRM message -
Code:
SET OutputRoot.MQRFH2.InputHeader.Data = InputRoot.XML.Input.Data
on the output queue the message is as follows:-
<MQRFH2 Header contents><InputHeader><Data><id>person</id><key>123</key><name>ABC</name></Data></InputHeader>
So my attributes in the 'Data' tag (id and key) are converted into tags here. Is there any way in which I can retain the 'Data' tag with the attributes in the output message ?
Any pointers on the above question would be helpful. _________________ Thanks,
Jayesh
I doubt you can do this. They aren't the same thing at all - the RFH2 stuff only looks like XML, it isn't XML. The only reason you're getting *anything* is because of the logical message tree.
You can, of course, use ASBITSTREAM to flatten the XML into bytes and base64 it or something.
Or you could prepend the XML to the message body with a separater of some kind to differentiate. _________________ I am *not* the model of the modern major general.
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