I have an XML file that contains over 50 000 records (and the future ones might have up to 500 000 records). Each record has 3 levels - main level (used to distinguish records), common data level (tags contain attributes that define each record) and the third level contains the data specific for each record (mostly as attributes, but sometimes as inner text). My task is to "dissect" this file into multiple smaller files. There is an attribute on the third level that determines in which group does the whole record belong.The algorithm should go like this:For each record in the file:
- Read the attribute that contains the informations necessary to determine the group to which the record belongs (this is easy, I solved this part)
- Copy the ENTIRE record (every letter on every level) into the appropriate file