Hi,
Previously, I have been using line numbers and their associated record type to highlight each line of a fixedLength invoice, to make each record (and their fields) more distinguishable.
I am now using groups (with an unlimited amount of nested subgroups), records, and segments, to account for the hierarchy of
I would like to show each line in an accordion, and by that I mean show every field in a collapseable record, itself shown in a collapseable group (and the same with any parent group, obviously).
The problem is that I have found no way of obtaining the group occurence number of the parsed records, since the output is the entire group type associated with every matching record.
For example, if a certain group has been found 3 consecutive times, I would like to be able to distinguish the appartenance of each line between those three, without having to redo what Beanio already does.
Example of what I would like:
GroupA.1
Record1
Record2
GroupB.1
Record3
Record4
GroupB.2
Record5
Record6
GroupA.2
Record7
Record8
GroupB.3
Record9
Record10
GroupB.4
Record11
Record12
I already have the full template of the hierarchy, names, positions, labels, depth, subgroups...etc.
I also have an hashmap associating the name of the record type and a list of every line of the invoice being of this type.
The only missing element is a link between the line numbers and each single occurence of the groups they are in.
Could you help me?
You will find attached a test config xml file and a test fixed length file. They are both very simple (maybe too simple), but I think they may help by avoiding you writing test files.
I'm trying to stay as generic as I can, so don't take this config file as a template of what's going to be parsed.
Thank you very much in advance.