From: transfire@... Date: 2006-07-08T23:39:09+09:00 Subject: Re: rexml: replace several text nodes by a single one Pete wrote: > Hi, > > this sounds simple but I just don't get it... > > I want to replace the text child nodes of an REXML::Element by a new, > single text node... > > In order to do that, I want to remove any previous text nodes first OMG, I was just about to ask the same thing. I was trying to delete them all first, but I don;t even get how to do that: node.parent.delete( node ) # soden;t seem to to work Do I really have to do case node when REXML::Element node.parent.delete_element( node ) when REXML::Attribute node.parent.delete_element( node ) when REXML::Text node.parent.delete_text( node ) else # else ? end Tell me it ain't so! T.