module Hpricot::Elem::Trav
def get_attribute(name)
def get_attribute(name) a = self.raw_attributes && self.raw_attributes[name.to_s] a = Hpricot.uxs(a) if a a end
def has_attribute?(name)
def has_attribute?(name) self.raw_attributes && self.raw_attributes.has_key?(name.to_s) end
def remove_attribute(name)
def remove_attribute(name) name = name.to_s if has_attribute? name altered! self.raw_attributes.delete(name) end end
def set_attribute(name, val)
def set_attribute(name, val) altered! self.raw_attributes ||= {} self.raw_attributes[name.to_s] = val.fast_xs end
def traverse_all_element(&block)
def traverse_all_element(&block) yield self children.each {|c| c.traverse_all_element(&block) } if children end
def traverse_some_element(name_set, &block)
def traverse_some_element(name_set, &block) yield self if name_set.include? self.name children.each {|c| c.traverse_some_element(name_set, &block) } if children end