Write XML function for testing.