Reputation: 13
I am trying to use the univocity-parsers to parse a fixed-width formatted file that includes a variable number of fixed-width records per line.
Format is record id [6], # of sub-records [3], sub-record [6]
Rec1..3..A1B1C1A2B2C2A3B3C3
Rec2..2..A1B1C1A2B2C2
The desired result is to have an array of sub-records. The @Linked annotation appears to apply but the documentation states this only available for the HTML parser.
My current solution is to parse the sub-records as a string, then loop through each record and insert newlines into the sub-record string and re-parse. Is there a way to accomplish this using univocity-parser?
Thanks in advance.
Upvotes: 1
Views: 376
Reputation: 6289
Author of the library here. This is not supported, you'll have to split these sub-records manually.
Upvotes: 0