Added random genxmlkey function