def find_type_elements_except(type, nested_except=[], elements=@elements)
      results = []
      if type.class == Symbol
        type = [type]
      end
      if nested_except.class == Symbol
        nested_except = [nested_except]
      end
      elements.each do |e|
        results.push(e) if type.include?(e.type)
        unless nested_except.include?(e.type) or e.children.empty?
          results.concat(find_type_elements_except(type, nested_except, e.children))
        end
      end
      results
    end
def find_type_elements_except(type, nested_except=[], elements=@elements)
      results = []
      if type.class == Symbol
        type = [type]
      end
      if nested_except.class == Symbol
        nested_except = [nested_except]
      end
      elements.each do |e|
        results.push(e) if type.include?(e.type)
        unless nested_except.include?(e.type) or e.children.empty?
          results.concat(find_type_elements_except(type, nested_except, e.children))
        end
      end
      results
    end
A variation on find_type_elements that allows you to skip drilling down
 into children of specific element types.

 Instead of a single type, a list of types can be provided instead to
 find all types.

 Unlike find_type_elements, this method will always search for nested
 elements, and skip the element types given to nested_except.