Class: REXML::Element

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

Instance Method Summary collapse

Instance Method Details

#node_namespacesObject



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

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



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

def rendered=(rendered)
	@rendered = rendered
end

#rendered?Boolean

Returns:

  • (Boolean)


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

def rendered?()
	return @rendered
end

#search_namespace(prefix) ⇒ Object



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

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