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.
input xml is
Transformed output message should be
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,
This topic has been locked.
1 reply Latest Post - 2013-01-10T14:38:43Z by firstname.lastname@example.org
Pinned topic Message Broker
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-01-10T14:38:43Z at 2013-01-10T14:38:43Z by email@example.com
firstname.lastname@example.org 120000CJSH515 PostsACCEPTED ANSWER
Re: Message Broker2013-01-10T14:38:43Z in response to SystemAdminYou 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.