IPWorks X12 2020 macOS Edition

Questions / Feedback?

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
Int32

Number of components in the current element.

componentIndex
Int32

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 property 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 property holds a human readable description of the component as obtained from the ArcESB JSON schema.

Note: This property 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 property 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:

ANAlphaNumeric
IDIdentifier; allowed values might be defined by the transaction set schema
NNumeric
RFloating-point number
DTDateTime
TMTime
NoneType is unknown or not provided by the schema
CompositeThis element has multiple components

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:

ANAlphaNumeric
IDIdentifier; allowed values might be defined by the transaction set schema
NNumeric
RFloating-point number
DTDateTime
TMTime
NoneType is unknown or not provided by the schema
CompositeThis element has multiple components

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 property is only applicable when a ArcESB JSON schema is loaded.

repeatCount
Int32

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
Int32

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 property holds a human readable description of the element as obtained from the ArcESB JSON schema.

Note: This property 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 property is only applicable when a ArcESB JSON schema is loaded.

value
String

The value directly associated with this EDI element.

Note that this property 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 properties.

Copyright (c) 2021 /n software inc. - All rights reserved.
IPWorks X12 2020 macOS Edition - Version 20.0 [Build 7941]