You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some EDI that I'd like to parse that looks like this:
REF*WS*CHBOH*0*QO>358>AD>20220608~
In other words, 358, AD, and 20220608 are all subelements of the REF04 element. Is there a way for me to get at the data?
I currently have REF defined as this:
[EdiSegment, EdiPath("REF")]
public class REF
{
[EdiValue(Path = "REF/0")]
public string ReferenceIdentificationQualifier { get; set; }
[EdiValue(Path = "REF/1")]
public string ReferenceIdentification { get; set; }
[EdiValue(Path = "REF/2")]
public string Description { get; set; }
[EdiValue(Path = "REF/3")]
public string RefIdentifier { get; set; }
}
When I parse and print out the data, I can see REF*WS*CHBOH*0*QO, but I can't get to the >358>AD>20220608.
Is there a way to get it to either drop the subelements into a property, or just eagerly grab everything? I'm perfectly fine parsing it after the majority of the EDI has been handled.
The text was updated successfully, but these errors were encountered:
you could make use of an additional structural class for elements and make use of the attribute [EdiElement]. Elements contain subelements (components) that are the values so in your example above REF/4 should be mapped to a class that has 4 components as properties.
I have some EDI that I'd like to parse that looks like this:
In other words,
358
,AD
, and20220608
are all subelements of the REF04 element. Is there a way for me to get at the data?I currently have REF defined as this:
When I parse and print out the data, I can see
REF*WS*CHBOH*0*QO
, but I can't get to the>358>AD>20220608
.Is there a way to get it to either drop the subelements into a property, or just eagerly grab everything? I'm perfectly fine parsing it after the majority of the EDI has been handled.
The text was updated successfully, but these errors were encountered: