# File lib/xml/dom/core.rb, line 2748 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 2832 def cloneNode(deep = true) super(deep, @name, @value) end
# File lib/xml/dom/core.rb, line 2809 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 99 def internalSubset; end
# File lib/xml/dom/core.rb, line 2775 def nodeName @name end
# File lib/xml/dom/core.rb, line 2764 def nodeType DOCUMENT_TYPE_NODE end
# File lib/xml/dom2/documenttype.rb, line 93 def publicId; @pubid; end
# File lib/xml/dom2/documenttype.rb, line 96 def systemId; @sysid; end
# File lib/xml/dom/core.rb, line 2784 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