Topic
1 reply Latest Post - ‏2013-01-10T14:38:43Z by kimbert@uk.ibm.com
SystemAdmin
SystemAdmin
4179 Posts
ACCEPTED ANSWER

Pinned topic Message Broker

‏2013-01-08T11:21:34Z |
Greetings,

We have xml input and it needs to be converted to name value pair format. Kindly provide some input on this and it will be much appreciated. we are using message broker 8.0.

For example
input xml is

<Customer>
<FirstName>John</FirstName>
<LastName>Philip</LastName>
</Customer>

Transformed output message should be

custname=John#&custname1=Philip

Kindly note that each input property should be mapped to different output key name like FirstName is mapped to custname and LastName is mapped to custname1.

Thanks & Regards,
-senthil
Updated on 2013-01-10T14:38:43Z at 2013-01-10T14:38:43Z by kimbert@uk.ibm.com
  • kimbert@uk.ibm.com
    kimbert@uk.ibm.com
    515 Posts
    ACCEPTED ANSWER

    Re: Message Broker

    ‏2013-01-10T14:38:43Z  in response to SystemAdmin
    You need to
    • Create a DFDL message model for your output. Make sure that the structure of the DFDL schema exactly matches the structure of your XML document.

    In the message flow:
    • Parse the input XML using the XMLNSC domain
    • In a Compute node, SET OutputRoot.DFDL.<root element name> = InputRoot.XMLNSC.<root element name>;

    Some tips for creating the DFDL model:
    • 'custname=' and 'custname1=' are tags for the element values. In DFDL, they are called 'initiators'. So the element called 'FirstName' will have its initiator set to 'custname' and the element 'LastName' will have its initiator set to 'custname1'.
    • '#&' is a delimiter that separates one element from the next. In DFDL, this is called a 'separator' and it goes on the sequence group that contains all of the elements.