Add XMTextWriter to generate xml