Accessing Validated EDI Data

Index

    Accessing Validated EDI Data

    You can access ALL data from an EDI file that has been validated.  The LoadValidatedData property must be set to true first.

    Example

    // Create a new instance of EDIValidator
    EDIValidator validator = new EDIValidator();
     
    // Set the EDI rules file
    validator.EDIRulesFile = “C:\\EDIRulesFile.Rules”;

    // Set the EDI file to validate
    validator.EDIFile = “C:\\EDIFile.txt”;

    // Validate
    ediValidator.Validate();
     
    // The EDI Document will contain all the data of the file     
    EDILightWeightDocument doc = ediValidator.EDILightWeightDocument;
     
    LightWeightLoop interchangeHeaderLoop = doc.Loops[0].GetLoop(“INTERCHANGE HEADER”);
    in EDI Validator
    Did this article answer your question?