EDIElement Type
An Element within an EDI Segment.
Remarks
An EDI Segment contains one or more Elements. Elements can either be simple (they just contain a value) or they may be composite (containing more than one Component).
A simple element will simply contain a Value. For a composite element you must iterate over the components it contains by setting the ComponentIndex field, and then using the ComponentValue field to get the value at the corresponding index.
Fields
ComponentCount Integer |
Number of components in the current element. | ||||||||||||||||
ComponentIndex Integer |
The index of the selected component of the current element. ComponentIndex valid values are from 0 to (ComponentCount - 1). | ||||||||||||||||
ComponentName String |
The name of the component selected by ComponentIndex, according to the Transaction Set schema. The name is based on the position of the element within the segment. For instance "DTM0101". See ComponentSchemaName for additional details. Note: This field is only applicable when a ArcESB JSON schema is loaded. | ||||||||||||||||
ComponentSchemaDesc String |
The textual description of the component from the loaded ArcESB JSON schema. This field holds a human readable description of the component as obtained from the ArcESB JSON schema. Note: This field is only applicable when a ArcESB JSON schema is loaded. | ||||||||||||||||
ComponentSchemaName String |
The name of the component as taken from the schema. ComponentName holds positional (ref) value like "DTM0101". ComponentSchemaName holds the Id taken from the schema. For instance:
reader.XPath = "/IX/TX/DTM"; for (int i = 0; i < reader.XElements[0].ComponentCount; i++) { reader.XElements[0].ComponentIndex = i; Console.WriteLine(reader.XElements[i].ComponentSchemaName + ": " + reader.XElements[i].ComponentValue); } When ComponentSchemaName is used this will use the name from the schema and will output values like:
2005: 137 2005: 137 2380: 201612151441 In contrast, if ComponentName was used the output would look like: DTM0101: 137 DTM0101: 137 DTM0102: 201612151441 Note: This field is only applicable when a ArcESB JSON schema is loaded. | ||||||||||||||||
ComponentType String |
The data type of component selected by ComponentIndex, according to the Transaction Set Schema. Possible values are:
| ||||||||||||||||
ComponentValue String |
The value of the component selected by ComponentIndex. | ||||||||||||||||
DataType String |
The data type of this EDI element, according to the Transaction Set Schema. Possible values are:
| ||||||||||||||||
Name String |
The name of this EDI element, according to the Transaction Set schema. The name is based on the position of the element within the segment. For instance "N101". See SchemaName for additional details. Note: This field is only applicable when a ArcESB JSON schema is loaded. | ||||||||||||||||
RepeatCount Integer |
The number of times this element is repeated in the in the segment. If the element is not repeated this will return 0. To access the repeated element values set RepeatIndex. | ||||||||||||||||
RepeatIndex Integer |
The index of the selected instance of this repeatable element. RepeatIndex valid values are from 0 to (RepeatCount - 1). Setting RepeatIndex will affect the value reported by all other properties. | ||||||||||||||||
SchemaDesc String |
The textual description of the element from the loaded ArcESB JSON schema. This field holds a human readable description of the element as obtained from the ArcESB JSON schema. Note: This field is only applicable when a ArcESB JSON schema is loaded. | ||||||||||||||||
SchemaName String |
The name of the element as taken from the schema. Name holds positional (ref) value like "N101". SchemaName holds the Id taken from the schema. For instance:
reader.XPath = "/IX/FG/TX/N1Loop1[1]/N1"; for (int i = 0; i < reader.XElements.Count; i++) { Console.WriteLine(reader.XElements[i].SchemaName + ": " + reader.XElements[i].Value); } When SchemaName is used this will use the name from the schema and will output values like:
98: ST 93: BUYSNACKS PORT 66: 9 67: 1223334445 In contrast, if Name was used the output would look like: N101: ST N102: BUYSNACKS PORT N103: 9 N104: 1223334445 Note: This field is only applicable when a ArcESB JSON schema is loaded. | ||||||||||||||||
Value String |
The value directly associated with this EDI element. Note that this field will be populated with the entire element contents when a composite element exists. The components of the composite element will also be parsed out into the ComponentName, ComponentType, and ComponentValue fields. |