Class: REXML::Element

Inherits:
Object
  • Object
show all
Defined in:
lib/xmlcanonicalizer.rb

Instance Method Summary collapse

Instance Method Details

#node_namespacesObject



55
56
57
58
59
60
61
62
63
64
65
# File 'lib/xmlcanonicalizer.rb', line 55

def node_namespaces()
  ns = Array.new()
  ns.push(self.prefix())
  self.attributes().each_attribute{|a|
    if (a.prefix() == "xmlns" or (a.prefix() == "" && a.local_name() == "xmlns"))
      ns.push("xmlns")
    end
  }
  self.prefixes().each { |prefix| ns.push(prefix) }
  ns
end

#rendered=(rendered) ⇒ Object



49
50
51
# File 'lib/xmlcanonicalizer.rb', line 49

def rendered=(rendered)
  @rendered = rendered
end

#rendered?Boolean

Returns:

  • (Boolean)


52
53
54
# File 'lib/xmlcanonicalizer.rb', line 52

def rendered?()
  return @rendered
end

#search_namespace(prefix) ⇒ Object



42
43
44
45
46
47
48
# File 'lib/xmlcanonicalizer.rb', line 42

def search_namespace(prefix)
  if (self.namespace(prefix) == nil)
    return (self.parent().search_namespace(prefix)) if (self.parent() != nil)
  else
    return self.namespace(prefix)
  end
end