module Hpricot::Traverse

def previous

This method includes text nodes and comments and such.
Returns to node neighboring this node to the north: just above it.
def previous
  sib = parent.children
  x = sib.index(self) - 1
  sib[x] if sib and x >= 0
end