working on GenerateXML