Jano Svitok wrote:>
> You should have done two things: 1. add root node <server> (with
> closing </server> just before </xml>) AND 2. remove the trailing
> </xml>

Great, thanks.
That should sort out the "legacy" files, and future ones can be 
corrected.

I have also been parsing each line with IO.foreach and 
/<(.+)[^>]*>(.+?)<(\/.+)>/, which though not as nice as a proper XML 
parser does avoid loading huge files into memory in one go.
-- 
Posted via http://www.ruby-forum.com/.