Deletes a child element.
|element:||Must be an Element, String, or Integer. If Element, the element is removed. If String, the element is found (via XPath) and removed. <em>This means that any parent can remove any descendant.<em> If Integer, the Element indexed by that number will be removed.|
|Returns:||the element that was removed.|
doc.delete_element "/a/b/c[@id='4']" doc.delete_element doc.elements["//k"] doc.delete_element 1
# File lib/rexml/element.rb, line 315 def delete_element element @elements.delete element end