xml coder and decoder to a database