Index
Finding Loops
Once a Typed Document is created loops can be retrieved. Data is stored in a logical structure corresponding to the implementation guides.
Example – Getting a Loop
Typed5010Document doc = newTyped5010Document(ediValidator.EDILightWeightDocument);
//Get the Interchange Header loop
DocumentLoop interchange = doc.MainSection.GetLoop(“INTERCHANGE HEADER”);
Example – Getting More Than One Loop
//Get all the 2000B loops in ‘parentLoop’
List<DocumentLoop> all2000BLoops = parentLoop.GetLoops(“2000B”);
Example – Drilling to Get Loops
//Get all the 2000B loops in loop 2000A of ‘parentLoop’
List<DocumentLoop> all2000BLoops = parentLoop.GetLoops(“2000A/2000B”);
Notice the forward slash (‘/’) operator is used to drill into loops. Use as many forward slashes as required to get to the loop(s) required.
Example
DocumentLoop loop2010AA =
doc.MainSection.GetLoop(“INTERCHANGE HEADER/FUNCTIONAL GROUP/ST HEADER/2000A/2010AA”);
List<DocumentLoop> all2010AALoops =
doc.MainSection.GetLoops(“INTERCHANGE HEADER/FUNCTIONAL GROUP/ST HEADER/2000A/2010AA”);