Load EDI Data From File

Index

    Load EDI Data From File

    EDIFileLoader allows developers to load EDI files from the file system using the EDIFile property. EDIFileLoader will also find the necessary delimiters if set.

    Example

    // Create a new instance of EDIFileLoader
    EDIFileLoader loader = new EDIFileLoader();


    // Set the EDI file path to load
    loader.EDIFile = “C:\\EDIFile.txt;

    // load the data
    EDILightWeightDocument loadedDocument = loader.Load();

    Since there are no rules required EDIFileLoader only parses and loads all the segments in one loop. It does not group the segments into a loop hierarchy structure. In order to retrieve the segments just access the Loops property with index 0. The segments are of type LightWeightSegment. They contain their corresponding elements and composite elements.

    in EDI File Loader
    Did this article answer your question?