Started on xml writer.
More work on xml writer.