Parsing EDI Rules File

Index

    Parsing EDI Rules File

    EDIRulesReader is a very fast parser that reads the EDI rules from a .Rules formatted rule file. EDIRulesReader is used primarily by the EDIValidator component to read, parse, validate and load EDI files, in that order. EDIValidator then uses the information in EDIRulesReader to do all of its validation. The EDI Rules Creator Studio Application uses the EDIRulesReader component to load .Rules files and EDIRulesCreator component to save .Rules file.

    In most cases the actions of the EDIRulesReader will be transparent to EDI developers using the RDPCrystal EDI Library. They will just use the EDIValidator component. However some developers will want to see rules displayed in another editor or for their own editing applications. You can use the EDIRulesReader to complete this task.

    Example

    // Create an instance of the EDI Rules Reader
    EDIRulesReader reader = new EDIRulesReader(“C:\\EDIRules.Rules”);

    // Load EDI Rules
    reader.Parse();

    // After parsing the following dictionary lists are available for custom programming and application development
    // All the elements in the rules file
    this.elements = reader.Elements;

    // All the segments in the rules file
    this.segments = reader.Segments;

    // All the composite segments in the rules file
    this.compositeSegments = reader.CompositesSegments;

    // All the segment schemas in the rules file
    this.segmentSchemas = reader.SegmentSchemas;

    // All code list in the rules files (internal and external)
    this.codeLists = reader.CodeLists;

    // All element formats
    this.elementFormats = reader.ElementFormats;
    // The complete rules of the .Rules format included loops, usages, segments, elements, element values
    this.loopSchema = reader.Schema;
    in EDI Rules Reader
    Did this article answer your question?