Giter Site home page Giter Site logo

Comments (3)

cleftheris avatar cleftheris commented on June 28, 2024

According to EDIFact (as well as the other 2 standards X12 and Tradacoms) inside of an EDI Segment such as UNB there is this a fixed structure. For example in your case.

  • tag: UNB
    • element 0: UNOC:3
      • component 0: UNOC
      • component 1: 3
    • element: 1: 109910000
      • component 0: 109910000
    • element 2: 999999999
      • component 0: 999999999
    • element 3: 240315:1342
      • component 0: 240315
      • component 1: 1342
    • element 4: 00384
      • component 0: 00384
    • element 5: <Empty>
      • component 0: <Empty>
    • element 6: AO05Q224ke0
      • component 0: AO05Q224ke0

A path is composed by these 3 PathFragments separated by / like so <SegmentName>/<ElementIndex>/<ComponentIndex>. The component index is synonymous to the <ValueIndex>

A part (fragment) can be either:

  1. Explicitly declared (full path)
  2. a wildcard * in order to enable CLR class reusability. In essence this enables a definition on an [EdiElement] class as a set of reusable component values under a different Segment context.
  3. Missing a part. This case is either because it is implied zero (on a component/value property) or because it is marked on an Element or Segment class.

Check out an older question here #179

Although your example should be working on first glance there may be something else going on. Can you add a pull request with a failing test.

from edi.net.

raisr avatar raisr commented on June 28, 2024

Thanks. That helped me.

from edi.net.

cleftheris avatar cleftheris commented on June 28, 2024

I forgot to mention that in cases where elements repeat multiple times (with variable count) inside of a Segment there is a special notation on order to map them to a collection instead of mapping them to multiple properties of the same type like Element1, Element2, ElementN

Like in this case: https://github.com/indice-co/EDI.Net/blob/master/test/indice.Edi.Tests/Models/EdiFact_Issue190.cs

from edi.net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.