-1

I have researched a lot on internet, but still not able to get exact solution for my problem. The problem mentioned in below link is much similar to mine, but this will not work.

If record exists then map, if not map another - Biztalk mapping

My Problem:
I have xml source file which has invoice information, something like this.

-<invoice>    
<invoiceNumber>1124</invoiceNumber>
+<invoiceHeader>
+<invoiceDetails>    
</invoice>
<invoiceNumber>1598</invoiceNumber>    
+<invoiceHeader>
+<invoiceDetails>    
</invoice>

It is possible that, sometimes the subnode ie. invoiceDetails information can be missing for few invoice Numbers,but header information will be present.

Output required: The output file (.csv) should have all invoice numbers irrespective of detail tag present or not?

RAHUL
  • 21
  • 3

2 Answers2

1

Add a Looping Functoid to the Map with the source link from and the target from the Looping Functoid linked to the row element in the Flat File Schema.

It will work, trust us. :)

Johns-305
  • 10,908
  • 12
  • 21
  • It works only for invoice number which has both invoice header and Details information,but the invoices which has no detail information are missed out in output (csv file). – RAHUL Jul 24 '17 at 05:00
0

It depends on how is the output schema, but solution must be easy only link tag to the output.

Behind the scenes, the XSLT produced is a loop for each tag and copy that value to the output, irrespective of detail tag present or not.

cs95
  • 379,657
  • 97
  • 704
  • 746
felixmondelo
  • 1,324
  • 1
  • 10
  • 19