test code handles xml document in ruby