|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Mapping an Input.MRM into an XML tag |
« View previous topic :: View next topic » |
Author |
Message
|
wendy |
Posted: Mon Aug 18, 2003 11:41 pm Post subject: Mapping an Input.MRM into an XML tag |
|
|
Apprentice
Joined: 10 Dec 2001 Posts: 47
|
Im having a problem I need to map an InputRoot.MRM into a single XML tag.
The statement
Set Output.XML.Message.Temp = InputRoot.MRM.*;
only allocates the first element.Im actually doing error handling and the number of element on Input.MRM is unknown.
Please help.Its urgent. |
|
Back to top |
|
 |
Craig B |
Posted: Tue Aug 19, 2003 12:57 am Post subject: |
|
|
Partisan
Joined: 18 Jun 2003 Posts: 316 Location: UK
|
Hi,
By using * in InputRoot.MRM.* you are asking for the first child of the MRM folder regardless of Name. If you change this SET statement to Set Output.XML.Message.Temp = InputRoot.MRM; then this should perform a whole tree copy which includes all the children of the MRM folder. _________________ Regards
Craig |
|
Back to top |
|
 |
Craig B |
Posted: Tue Aug 19, 2003 1:07 am Post subject: |
|
|
Partisan
Joined: 18 Jun 2003 Posts: 316 Location: UK
|
Having read your update again, you mention that you want the contents of the MRM tree to be written into a single XML tag. If you use the SET statement I specified in my last update then this will create multiple children in the XML tree. When this OutputRoot.XML tree is written to a message, then this will result in all the MRM fieldnames and values being written out as children of the Tag 'Temp'. This may not be what you want. If you just want the one XML 'Temp' tag written out which contains the values of the all MRM fields, then you really want the bitstream of the MRM tree inserted into the XML tag. To do this you can either use the
Code: |
SET OutputRoot.XML.MessageTemp = CAST(BITSTREAM(InputRoot.MRM) AS CHAR CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);
|
Or if the MRM tree has changed through the flows then :
Code: |
SET OutputRoot.XML.MessageTemp = CAST(ASBITSTREAM(InputRoot.MRM, InputRoot.MQMD.Encoding, InputRoot.MQMD.CodedCharSetId, 'MRMSetName','MRMMessageName','MRMFormatName',RootBitStream) AS CHAR CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);
|
But if you are trying to insert the MRM bitstream into the XML message, then you have to be careful that this does not contain characters that would be invalid in the XML domain such as X'00'.
This is a more general answer with alternatives ..... if you clarify exactly what you want to see in the XML message, then I can guide you more specifically. _________________ Regards
Craig |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|