From: "Hammond, Tony (ELSLON)" Date: 2002-10-08T01:38:05+09:00 Subject: REXML & Root Node Hi: I'm getting errors from REXML with leading whitespace when I have an XML Declaration - see below. (Problem doesn't show up when I omit the Declaration.) Any ideas? Also I'm not quite sure why the document element is returned by the root method. Surely the root node is the outermost container which wraps document element, PI's, XML Declaration, whitespace, etc.? Thanks for any insights, Tony % cat test-rexml #!/usr/local/bin/ruby require 'rexml/document'; include REXML doc = Document.new File.new('tmp.xml') % test-rexml /usr/local/lib/ruby/site_ruby/1.6/rexml/document.rb:234:in `parse': attempted a ding second root element to document (REXML::ParseException) % cat tmp.xml % test-rexml /usr/local/lib/ruby/site_ruby/1.6/rexml/element.rb:686:in `base_parser': malfor ed XML: missing tag start (REXML::ParseException) % cat tmp.xml