Response layouts typically contains a closing record that specifies the number of different records in the file (and the summed amounts for transactions). These counts can be validated using a visitor.
A generic CountingVisitor could count all node types and validate the count using a generic Closing record node. The type of node a count refers to could be specified at parse time.
Monetary amounts could possible be validated in the same manner.
Edit: There is now a generic closing record universaly applied.
Response layouts typically contains a closing record that specifies the number of different records in the file (and the summed amounts for transactions). These counts can be validated using a visitor.
A generic
CountingVisitor
could count all node types and validate the count using a genericClosing
record node. The type of node a count refers to could be specified at parse time.Monetary amounts could possible be validated in the same manner.
Edit: There is now a generic closing record universaly applied.