# File lib/xml/dom/core.rb, line 1156 def [](name) @nodes[name] end
# File lib/xml/dom/core.rb, line 1165 def []=(name, node) raise "parameter error" if node.nodeName != name @nodes[name] = node end
get nodeValues by names
names ::= name ('|' name)*
# File lib/xml/dom/core.rb, line 1195 def _getValues(names) ret = [] names.split('|').each do |name| if !@nodes[name].nil? ret.push(@nodes[name].nodeValue) end end ret end
# File lib/xml/dom/core.rb, line 1175 def each @nodes.each do |key, value| yield(value) end end
# File lib/xml/dom/core.rb, line 1110 def getNamedItem(name) @nodes[name] end
# File lib/xml/dom/core.rb, line 1145 def item(index) v = @nodes.to_a[index] return v[1] if v nil end
# File lib/xml/dom/core.rb, line 1132 def removeNamedItem(name) ret = @nodes[name] @nodes[name] = nil ret end
# File lib/xml/dom/core.rb, line 1121 def setNamedItem(node) @nodes[node.nodeName] = node end
# File lib/xml/dom/core.rb, line 1188 def size @nodes.length end