From: Mark Hubbart Date: 2004-04-29T02:38:01+09:00 Subject: Re: rexml: how to get element type? On Apr 28, 2004, at 5:19 AM, Sean Russell wrote: > Mark Hubbart wrote in message > news:<874825E2-96EA-11D8-9038-000502FDD5CC@mac.com>... >> If I can jump in here... That last time I tried working with rexml, I >> opened a medium sized xml file in irb. I created a new REXML::Document >> IIRC, and it automatically inspected it, since it was the return >> value. > > Hm. I do admit that #inspect on REXML objects is rather useless, > unless you're doing debugging. I used it quite a bit when I was first > developing REXML. I could truncate it and have it show something > like: > > ... > > Sort of a truncated XML representation. That would be nice :) Basically, anything that would make it possible to use REXML normally in irb would be greatly appreciated. If the full #inspect is necessary sometimes (I don't know), then perhaps there could be a verbosity level of some sort? So that it could be set like this: REXML.verbose_inspect = false This would make it useful in irb. Looking over the output from a simple bit of xml, it looks like much could be done just by hiding a few instance variables and all grandchildren. cheers, --Mark