DataCellX12R Class (Extends DataCellReal)

As noted above, this class is derived from the DataCellReal class developed in Chapter 8. It uses that class's toXML method but provides its own fromXML and prepareOutput methods.

Logic for the DataCellX12R fromXML Method
Arguments:
  None

Returns:
  Error status or throws exception

Trim Spaces
IF Cell Buffer = -0, INF, -INF, or NaN
  Return error for unsupported constant in X12 Decimal date type
ENDIF
Convert to uppercase since XML schema language data types allow
    a lower case 'e' to indicate the exponent
IF first Character in Cell Buffer = "+"
  Cell Buffer <- Shift Cell Buffer left one character to remove
      plus sign
  Decrement Buffer Length
ENDIF
Return success
Logic for the DataCellX12R prepareOutput Method ...

Get Using XML with Legacy Business Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.