Added functions to add registers & fields into xml file