add an example for writing xml