Added XML generation.