From: 7stud -- Date: 2011-04-15T02:34:32+09:00 Subject: Re: removing nodes from Nokogiri::XML::NodeSet Ted Flethuseo wrote in post #992628: > Hi everyone, > > I am having trouble removing a node from a Nokogiri::XML::NodeSet, not > sure what > I should use to remove a specific node at a given position. > > I have tried the following but it doesn't seem to work: > > puts nodes.length > nodes[0].remove > puts nodes.length > > > Ted Consider this example: str = "hello \n world" arr = str.split " " p arr --output:-- ["hello", "world"] str.delete!(arr[0]) puts str puts arr.length -- Posted via http://www.ruby-forum.com/.