added XML <-> Tuple conversion