in reply to writing the data structure into a XML file (with high performance)
If I had to do this task I'd check out all the modules to see if they have the features I need, then I'd take the ones that do have the features and benchmark them.
If you still don't find anything suited for your task you need to be bold as brass and write yourself the needed tool.
History shows that a stage in man's evolution was Homo Faber when men built tools to control their environment, you can do that too.
And then you can put it on CPAN.