Class/Module Index [+]

Quicksearch

HTML5::TreeBuilders::REXML::Element

Public Class Methods

new(name) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/treebuilders/rexml.rb, line 65
def initialize name
  super name
end
rxclass() click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/treebuilders/rexml.rb, line 61
def self.rxclass
  ::REXML::Element
end

Public Instance Methods

attributes=(value) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/treebuilders/rexml.rb, line 75
def attributes= value
  value.each {|name, value| rxobj.attributes[name] = value}
end
cloneNode() click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/treebuilders/rexml.rb, line 69
def cloneNode
  newNode = self.class.new name
  attributes.each {|name,value| newNode.attributes[name] = value}
  newNode
end
printTree(indent=0) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/treebuilders/rexml.rb, line 79
def printTree indent=0
  tree = "\n|#{' ' * indent}<#{name}>"
  indent += 2
  for name, value in attributes
    next if name == 'xmlns'
    tree += "\n|#{' ' * indent}#{name}=\"#{value}\""
  end
  for child in childNodes
    tree += child.printTree(indent)
  end
  tree
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.