Class: REXML::Element

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

Instance Method Summary collapse

Instance Method Details

#node_namespacesObject



65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/xml/util/xmlcanonicalizer.rb', line 65

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

#rendered=(rendered) ⇒ Object



59
60
61
# File 'lib/xml/util/xmlcanonicalizer.rb', line 59

def rendered=(rendered)
	@rendered = rendered
end

#rendered?Boolean

Returns:

  • (Boolean)


62
63
64
# File 'lib/xml/util/xmlcanonicalizer.rb', line 62

def rendered?()
	return @rendered
end

#search_namespace(prefix) ⇒ Object



52
53
54
55
56
57
58
# File 'lib/xml/util/xmlcanonicalizer.rb', line 52

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