Subject:XML to 837I EDI -- multiple NM1 segments Author:Chris Lingor Date:14 May 2009 05:35 PM
I'm trying to map from XML to the built-in XSD schema for the 837I EDI and I'm having trouble figuring out how to create multiple loops of a given GROUP node.
For example, I need to map from my XML ProviderName to TS_837/GROUP_2/GROUP_3/NM1[NM101='85']/NM103 (setting both NM101, NM103, and all other related fields for the provider). However, I also need to map from PayToName to TS_837/GROUP_2/GROUP_3/NM1[NM101='PR']/NM103 (as well as other related Pay-to fields with NM101='PR').
I understand how to map the other direction using XPath, but I'm not sure how to set up the XQuery functions in the mapper to map from multiple XML nodes to multiple loops in the target XSD.
Could someone please provide some guidance? Thanks!