getting the result of the algorithm onto the ui and formatting the xml files to have proper indentation