Compares two namespace objects. Namespace objects are considered equal if their prefixes and hrefs are the same.
# File lib/libxml/namespace.rb, line 14 14: def <=>(other) 15: if self.prefix.nil? and other.prefix.nil? 16: self.href <=> other.href 17: elsif self.prefix.nil? 18: 1 19: elsif other.prefix.nil? 20: 1 21: else 22: self.prefix <=> other.prefix 23: end 24: end
libxml stores namespaces in memory as a linked list. Use the each method to iterate over the list. Note the first namespace in the loop is the current namespace.
Usage:
namespace.each do |ns| .. end
# File lib/libxml/namespace.rb, line 37 37: def each 38: ns = self 39: 40: while ns 41: yield ns 42: ns = ns.next 43: end 44: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.