Parsing An EDI File


    Parsing An EDI File

    EDIFileParser allows developers to parse EDI files line by line while auto detecting all special characters needed to correctly parse the data.


    // Create a new instance of EDIFileParser
    EDIFileParser parser = new EDIFileParser(“C:\\SampleEDI.txt);

    // Start loading the file on a background thread
    // Iterate over the EDI file
    while (!parser.Finished()){
       string line = parser.NextLine();
    The Finished() method will return true when all lines have been read.  At this point the file will be closed.  The NumberOfSegment property can now be checked to see how many segments were read.
    in EDI File Parser
    Did this article answer your question?