this code helps generate an xml