AnsweredAssumed Answered

Why Map Shape behave differently when dealing with XML and CSV?

Question asked by hanwen.guo033144 on Apr 18, 2018
Latest reply on Apr 18, 2018 by hanwen.guo033144

Hi All,

 

I was playing around with Map Shape to deal with batched documents.

 

I used two Message Shape to generate batched XML and CSV, and the use the mapping to deal with them.

 

One Map Shape mapping CSV to CSV outputs a document with multiple records, while the other one mapping XML to CSV only outputs a document with one record.

 

That is,  after mapping, CSV to CSV has the same number of records as the input document, while XML to CSV only has the first record in the XML like input document, see the snap of the output

 

I was wondering why they behave differently?

 

CSV 2 CSV output: 

      

 

XML 2 CSV output

 

 

Details are provided in following.

 

XML record generated by Message Shape:

<record>
<id>1</id>
<content>content 1</content>
</record>
<record>
<id>2</id>
<content>content 2</content>
</record>
<record>
<id>3</id>
<content>content 3</content>
</record>
<record>
<id>4</id>
<content>content 4</content>
</record>

 

 

 

CSV record generated by Message Shape:

1,some content 1
2,some content 2
3,some content 3
4,some content 4

 

Process

 

Message Shapes

 

Mappings

Outcomes