text: String
# File lib/xml/dom/core.rb, line 2588 def initialize(text = nil) super(text) raise "parameter error" if !text end
# File lib/xml/dom/core.rb, line 2638 def _getMyLocation(parent) index = 1 parent.childNodes do |child| if child == self return "child(#{index},#comment)" end if child.nodeType == COMMENT_NODE index += 1 end end nil end
# File lib/xml/dom2/xpath.rb, line 364 def _getMyLocationInXPath(parent) n = parent.childNodes.to_a.select { |i| i.nodeType == COMMENT_NODE }.index(self) "comment()[#{n + 1}]" end
# File lib/xml/dom/core.rb, line 2633 def dump(depth = 0) print ' ' * depth * 2 print "<!--#{@value.inspect}-->\n" end
# File lib/xml/dom/core.rb, line 2613 def nodeName "#comment" end
# File lib/xml/dom/core.rb, line 2602 def nodeType COMMENT_NODE end
# File lib/xml/dom/core.rb, line 2622 def to_s ret = "<!--#{@value}-->" ret << "\n" if parentNode.nodeType == DOCUMENT_NODE ret end