Generate XML Database Function Finish