[wip] Created helper function for generating xml