class XML::DOM::ProcessingInstruction
begin¶ ↑
Class XML::DOM::ProcessingInstruction¶ ↑
superclass¶ ↑
end¶ ↑
class Comment
def getDigest(algorithm = Digest::MD5, force = false) (!force && @digest) || @digest = algorithm.digest([COMMENT_NODE].pack("N") + DOM.tou16(data)).digest end
end
begin¶ ↑
Class XML::DOM::ProcessingInstruction¶ ↑
superclass¶ ↑
end¶ ↑
Public Class Methods
new(target = nil, data = nil)
click to toggle source
begin¶ ↑
Class Methods¶ ↑
Calls superclass method
XML::DOM::Node.new
# File lib/xml/dom/core.rb, line 3126 def initialize(target = nil, data = nil) super() raise "parameter error" if !data @target = target.freeze @data = data.freeze @value = target.dup @value << " #{data}" if data != "" @value.freeze end
Public Instance Methods
_getMyLocation(parent)
click to toggle source
# File lib/xml/dom/core.rb, line 3246 def _getMyLocation(parent) index = 1 parent.childNodes do |child| if child == self return "child(#{index},#pi)" end if child.nodeType == PROCESSING_INSTRUCTION_NODE index += 1 end end nil end
_getMyLocationInXPath(parent)
click to toggle source
# File lib/xml/dom2/xpath.rb, line 376 def _getMyLocationInXPath(parent) n = parent.childNodes.to_a.select { |i| i.nodeType == PROCESSING_INSTRUCTION_NODE }.index(self) "processing-instruction()[#{n + 1}]" end
cloneNode(deep = true)
click to toggle source
begin¶ ↑
Calls superclass method
XML::DOM::Node#cloneNode
# File lib/xml/dom/core.rb, line 3266 def cloneNode(deep = true) super(deep, @target.dup, @data.dup) end
data=(p)
click to toggle source
dump(depth = 0)
click to toggle source
getDigest(algorithm = Digest::MD5, force = false)
click to toggle source
# File lib/xml/dom/digest.rb, line 51 def getDigest(algorithm = Digest::MD5, force = false) (!force && @digest) || @digest = algorithm.digest([PROCESSING_INSTRUCTION_NODE].pack("N") + DOM.tou16(target) + "\0\0" + DOM.tou16(data)) end
nodeName()
click to toggle source
nodeType()
click to toggle source
nodeValue()
click to toggle source
target()
click to toggle source
target=(p)
click to toggle source