Some test code

- add a tester for XML writing