Removing Empty Elements And Empty Composite Elements

Index

    Removing Empty Elements And Empty Composite Elements

    It is good practice when creating EDI files not to leave trailing empty data elements and composite data elements. EDI Documents does this for you automatically.

    For example, a segment like the following is incorrect:

    SEG*1*2*5****~

    EDI document removes trailing empty data elements and composite data elements. The above segment would be converted to the following:

    SEG*1*2*5~

    You can turn this off/on if desired. We recommend that you leave these settings to their default values.

    Example

    ediDocument.TruncateEmptyElements = true;
    ediDocument.TruncateEmptyCompositeElements = true;

    in Creating Well Formed EDIDocuments
    Did this article answer your question?