Added conversion between xml writer and reader

Signed-off-by: Tom Wright <tom@inflatablecookie.com>