Mapping with BizTalk + Multiple nodes to a single one -
I am trying to mapping this XML with:
& lt; Rootxml & gt; & Lt; Documents & gt; & Lt; Document & gt; & Lt; Iddoc & gt; 1 & lt; / Iddoc & gt; & Lt; TOTAL_PRICE & gt 1000 & lt; / TOTAL_PRICE & gt; & Lt; / Documents & gt; & Lt; / Documents & gt; & Lt; Items & gt; & Lt; Items & gt; & Lt; Iddoc & gt; 1 & lt; / Iddoc & gt; & Lt; Iditem & gt; 1 & lt; / Iditem & gt; & Lt; Quantity & gt; 1 & lt; / Quantity & gt; & Lt; Price & gt; 800 & lt; / Pricing & gt; & Lt; / Item & gt; & Lt; Items & gt; & Lt; Iddoc & gt; 1 & lt; / Iddoc & gt; & Lt; Iditem & gt; 2 & lt; / Iditem & gt; & Lt; Quantity & gt; 1 & lt; / Quantity & gt; & Lt; Price & gt; 200 & lt; / Pricing & gt; & Lt; / Item & gt; & Lt; / Item & gt; & Lt; Taxes & gt; & Lt; Tax & gt; & Lt; Iddoc & gt; 1 & lt; / Iddoc & gt; & Lt; Iditem & gt; 1 & lt; / Iditem & gt; & Lt; Idtax & gt 1000 & lt; / Idtax & gt; & Lt; Price & gt; 123.90 & lt; / Pricing & gt; & Lt; Tax & gt; & Lt; Tax & gt; & Lt; Iddoc & gt; 1 & lt; / Iddoc & gt; & Lt; Iditem & gt; 2 & lt; / Iditem & gt; & Lt; Idtax & gt 1000 & lt; / Idtax & gt; & Lt; Price & gt; 34.13 & lt; / Pricing & gt; & Lt; Tax & gt; & Lt; / Taxes & gt; & Lt; / Rootxml & gt;
For this one:
& lt; Resultxml & gt; & Lt; Documento & gt; & Lt; Iddoc & gt; 1 & lt; / Iddoc & gt; & Lt; TOTAL_PRICE & gt 1000 & lt; / TOTAL_PRICE & gt; & Lt; Items & gt; & Lt; Items & gt; & Lt; Iddoc & gt; 1 & lt; / Iddoc & gt; & Lt; Iditem & gt; 1 & lt; / Iditem & gt; & Lt; Quantity & gt; 1 & lt; / Quantity & gt; & Lt; Price & gt; 800 & lt; / Pricing & gt; & Lt; Taxes & gt; & Lt; Idtax & gt 1000 & lt; / Idtax & gt; & Lt; Price & gt; 123.90 & lt; / Pricing & gt; & Lt; / Taxes & gt; & Lt; / Item & gt; & Lt; Items & gt; & Lt; Iddoc & gt; 1 & lt; / Iddoc & gt; & Lt; Iditem & gt; 2 & lt; / Iditem & gt; & Lt; Quantity & gt; 1 & lt; / Quantity & gt; & Lt; Price & gt; 200 & lt; / Pricing & gt; & Lt; Taxes & gt; & Lt; Tax & gt; & Lt; Idtax & gt 1000 & lt; / Idtax & gt; & Lt; Price & gt; 34.13 & lt; / Pricing & gt; & Lt; Tax & gt; & Lt; / Taxes & gt; & Lt; / Item & gt; & Lt; / Item & gt; & Lt; / Documento & gt; & Lt; / Resultxml & gt;
I do not know how to solve this. Although there may be many documents in the original XML document, it will always be one, so I have to merge the items and taxes into my related items.
Thank you
I think you have to write a part of the custom XSLT. Create objects for loops and taxes / taxes [where iditem = $ itemId] through objects / items. This trick is to get the first item in the variable
Sorry, I have limited time now, I can not make a full work demo for you, here is a related issue that I had some time ago:
Neil Walters
Comments
Post a Comment