class XML::DOM::CDATASection
Class XML::DOM::CDATASection
¶ ↑
superclass¶ ↑
Class XML::DOM::CDATASection
¶ ↑
superclass¶ ↑
Public Class Methods
new(text = nil)
click to toggle source
Class Methods¶ ↑
Calls superclass method
XML::DOM::Text::new
# File lib/xml/dom/core.rb, line 2670 def initialize(text = nil) super(text) raise "parameter error" if !text end
Public Instance Methods
_getMyLocation(parent)
click to toggle source
# File lib/xml/dom/core.rb, line 2718 def _getMyLocation(parent) index = 1 parent.childNodes do |child| if child == self return "child(#{index},#cdata)" end if child.nodeType == CDATA_SECTION_NODE index += 1 end end nil end
_getMyLocationInXPath(parent)
click to toggle source
# File lib/xml/dom2/xpath.rb, line 352 def _getMyLocationInXPath(parent) n = parent.childNodes.to_a.select { |i| i.nodeType == TEXT_NODE or i.nodeType == CDATA_SECTION_NODE }.index(self) "text()[#{n + 1}]" end
dump(depth = 0)
click to toggle source
# File lib/xml/dom/core.rb, line 2713 def dump(depth = 0) print ' ' * depth * 2 print "<![CDATA[#{@value.inspect}]]>\n" end
nodeName()
click to toggle source
# File lib/xml/dom/core.rb, line 2695 def nodeName "#cdata-section" end
nodeType()
click to toggle source
to_s()
click to toggle source
# File lib/xml/dom/core.rb, line 2704 def to_s "<![CDATA[#{@value}]]>" end