Object
Returns whether this attribute has child attributes.
# File lib/libxml/attr.rb, line 13 13: def child? 14: not self.children.nil? 15: end
Determine whether this attribute is associated with an XML::Document.
# File lib/libxml/attr.rb, line 22 22: def doc? 23: not self.doc.nil? 24: end
# File lib/libxml/attr.rb, line 97 97: def each_sibling(&blk) 98: siblings(self,&blk) 99: end
Determine whether this is the last attribute.
# File lib/libxml/attr.rb, line 30 30: def last? 31: self.last.nil? 32: end
Returns this node’s XML::Namespaces object, which is used to access the namespaces associated with this node.
# File lib/libxml/attr.rb, line 57 57: def namespaces 58: @namespaces ||= XML::Namespaces.new(self) 59: end
Determine whether there is a next attribute.
# File lib/libxml/attr.rb, line 38 38: def next? 39: not self.next.nil? 40: end
Returns this node’s type name
# File lib/libxml/attr.rb, line 79 79: def node_type_name 80: if node_type == Node::ATTRIBUTE_NODE 81: 'attribute' 82: else 83: raise(UnknownType, "Unknown node type: %n", node.node_type); 84: end 85: end
Determine whether this attribute has an associated namespace.
# File lib/libxml/attr.rb, line 47 47: def ns? 48: not self.ns.nil? 49: end
Determine whether this attribute has a parent.
# File lib/libxml/attr.rb, line 66 66: def parent? 67: not self.parent.nil? 68: end
Determine whether there is a previous attribute.
# File lib/libxml/attr.rb, line 74 74: def prev? 75: not self.prev.nil? 76: end
Iterates nodes and attributes
# File lib/libxml/attr.rb, line 88 88: def siblings(node, &blk) 89: if n = node 90: loop do 91: blk.call(n) 92: break unless n = n.next 93: end 94: end 95: end
# File lib/libxml/attr.rb, line 111 111: def to_a 112: inject([]) do |ary,a| 113: ary << [a.name, a.value] 114: ary 115: end 116: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.