Improve xml formatter
Support alternative megastek format