From: Zach Dennis Date: 2005-09-14T05:59:49+09:00 Subject: Re: REXML and new file problem? bug? This is not a bug, from the documentation on the constructor: "Constructor @param source if supplied, must be a Document, String, or IO. Documents have their context and Element attributes cloned. Strings are expected to be valid XML documents. IOs are expected to be sources of valid XML documents" ^^^^^^^^^^^^^^^^^^^^^^ If you want to create a new xml document from scratch then please use the syntax: doc = REXML::Document.new If you want to write it to something use an IO object... doc.write obj_to_output_to where obj_to_output_to can be any object that responds to <<, so an IO object, a string, a StringIO, etc... Zach