method
delete_element
delete_element(element)
public
Deletes a child element.
element: | Must be an Element, String, or Integer. If Element, the element is removed. If <a href="/ruby/String">String,</a> the element is found (via XPath) and removed. <em>This means that any parent can remove any descendant.<em> If <a href="/ruby/Integer">Integer,</a> 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