Class: REXML::Element

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

Instance Method Summary collapse

Instance Method Details

#node_namespacesObject



60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/xml/util/xmlcanonicalizer.rb', line 60

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



54
55
56
# File 'lib/xml/util/xmlcanonicalizer.rb', line 54

def rendered=(rendered)
	@rendered = rendered
end

#rendered?Boolean

Returns:

  • (Boolean)


57
58
59
# File 'lib/xml/util/xmlcanonicalizer.rb', line 57

def rendered?()
	return @rendered
end

#search_namespace(prefix) ⇒ Object



47
48
49
50
51
52
53
# File 'lib/xml/util/xmlcanonicalizer.rb', line 47

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