output xml to file in .rb