a simple xml writer - by tdd