New method for transform xml string to object.