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