Unfortunately this isn't the problem. Our input message looks like this:

<GSK.ChartOfAccounts elementName="GSK.ChartOfAccounts" language
="English">chart of account</GSK.ChartOfAccounts>


And we need it to go out like this:

<AnotherTag><GSK.ChartOfAccounts elementName="GSK.ChartOfAccounts" language
="English">chart of account</GSK.ChartOfAccounts><Anything>dummy</Anything>/<AnotherTag>


We want to store the original data in the destination list so we can do other processing first and then move it back to outputroot.xml when we want to send messages out.

Any other thoughts?



"Christopher Frank" <[EMAIL PROTECTED]>

Sent by: "MQSeries List" <[EMAIL PROTECTED]>

11-Jun-2002 18:51
Please respond to "MQSeries List" <[EMAIL PROTECTED]>

       
                       

        To:        MQSERIES

        cc:        
        Subject:        Re: XML attributes being lost/converted to tags



Kulbir,

>>>We're sending XML messages through a flow and having problems
>>>with the XML format. <snip> The following problems exist:
>>>   attributes are sometimes converted to tags (i.e. elementName,
language, action>
>>>   attributes are lost (i.e. class attribute for the UniqueName tag)
>>>Has anyone seen this before?  Any suggestions?

When setting the attribute in the output message tree, you must specify its
type. You can do this using a CAST function. For example, if your input
message looked like this:

<msg>
 <elementName>GSK.ChartOfAccounts</elementName>
 <language>English</language>
</msg>

and you wanted your output XML to look like this:

<GSK.ChartOfAccounts elementName="GSK.ChartOfAccounts" language
="English"></GSK.ChartOfAccounts>

your eSQL might look like this:

  SET OutputRoot.XML."GSK.ChartOfAccounts".(XML.attr)elementName =
CAST(InputBody.msg.elementName AS CHARACTER);
 SET OutputRoot.XML."GSK.ChartOfAccounts".(XML.attr)language =
CAST(InputBody.msg.language AS CHARACTER);

Hope this helps.

Regards,

Christopher Frank
Sr. I/T Specialist - IBM Software Group
IBM Certified Solutions Expert - Websphere MQ & MQ Integrator
--------------------------------------------
Phone: 612-397-5532 (t/l 653-5532) mobile: 612-669-3008
e-mail: [EMAIL PROTECTED]

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive



Reply via email to