class Nokogiri::XML::NodeSet

def shift

+nil+ if the set is empty.
Returns the first element of the NodeSet and removes it. Returns
##
def shift
  return nil if length == 0
  delete(first)
end