add XMLResourceTest, implement XMLResourceGenerator