xml writer sample