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,
email@example.com 120000CJSH515 Posts
Re: Message Broker2013-01-10T14:38:43ZThis is the accepted answer. This is the accepted answer.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.