# File lib/xml/dom/core.rb, line 2747 def initialize(name, value = nil, *children) super(*children) raise "parameter error" if !name @name = name.freeze @value = value.freeze end
# File lib/xml/dom/core.rb, line 2831 def cloneNode(deep = true) super(deep, @name, @value) end
# File lib/xml/dom/core.rb, line 2808 def dump(depth = 0) print ' ' * depth * 2 print "<!DOCTYPE #{@name} #{@value} [\n" @children.each do |child| print ' ' * (depth + 1) * 2 if child.nodeType == PROCESSING_INSTRUCTION_NODE || child.nodeType == COMMENT_NODE child.dump else print child.nodeValue, "\n" end end if @children print ' ' * depth * 2 print "]>\n" end
# File lib/xml/dom2/documenttype.rb, line 98 def internalSubset; end
# File lib/xml/dom/core.rb, line 2774 def nodeName @name end
# File lib/xml/dom/core.rb, line 2763 def nodeType DOCUMENT_TYPE_NODE end
# File lib/xml/dom2/documenttype.rb, line 92 def publicId; @pubid; end
# File lib/xml/dom2/documenttype.rb, line 95 def systemId; @sysid; end
# File lib/xml/dom/core.rb, line 2783 def to_s ret = "<!DOCTYPE " + @name if !@value.nil? ret <<= " " + @value end if !@children.nil? && @children.length > 0 ret <<= " [\n" @children.each do |child| if child.nodeType == PROCESSING_INSTRUCTION_NODE || child.nodeType == COMMENT_NODE ret <<= child.to_s + "\n" else ret <<= child.nodeValue + "\n" end end ret <<= "]" end ret <<= ">" end