method

previous_element

v1_9_3_125 - Show latest stable - Class: REXML::Element
previous_element()
public

Returns the previous sibling that is an element, or nil if there is no Element sibling prior to this one doc = Document.new ‘<a>text<c/>’ doc.root.elements[‘c’].previous_element #-> <b/> doc.root.elements[‘b’].previous_element #-> nil