add write xml from string
add a method that retrieve error messages