# File lib/xml/dom/core.rb, line 1157 def [](name) @nodes[name] end
# File lib/xml/dom/core.rb, line 1166 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 1196 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 1176 def each @nodes.each do |key, value| yield(value) end end
# File lib/xml/dom/core.rb, line 1111 def getNamedItem(name) @nodes[name] end
# File lib/xml/dom/core.rb, line 1146 def item(index) v = @nodes.to_a[index] return v[1] if v nil end
# File lib/xml/dom/core.rb, line 1133 def removeNamedItem(name) ret = @nodes[name] @nodes[name] = nil ret end
# File lib/xml/dom/core.rb, line 1122 def setNamedItem(node) @nodes[node.nodeName] = node end
# File lib/xml/dom/core.rb, line 1189 def size @nodes.length end