Parent

Included Modules

LibXML::XML::Attr

Public Instance Methods

child? → (true|false) click to toggle source

Returns whether this attribute has child attributes.

    # File lib/libxml/attr.rb, line 13
13:       def child?
14:         not self.children.nil?
15:       end
doc? → (true|false) click to toggle source

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
each(&blk) click to toggle source
Alias for: each_sibling
each_attr(&blk) click to toggle source
Alias for: each_sibling
each_sibling(&blk) click to toggle source
    # File lib/libxml/attr.rb, line 97
97:       def each_sibling(&blk)
98:         siblings(self,&blk)
99:       end
Also aliased as: each_attr, each
last? → (true|false) click to toggle source

Determine whether this is the last attribute.

    # File lib/libxml/attr.rb, line 30
30:       def last?
31:         self.last.nil?
32:       end
namespacess → XML::Namespaces click to toggle source

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
next? → (true|false) click to toggle source

Determine whether there is a next attribute.

    # File lib/libxml/attr.rb, line 38
38:       def next?
39:         not self.next.nil?
40:       end
node_type_name() click to toggle source

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
ns? → (true|false) click to toggle source

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
parent? → (true|false) click to toggle source

Determine whether this attribute has a parent.

    # File lib/libxml/attr.rb, line 66
66:       def parent?
67:         not self.parent.nil?
68:       end
prev? → (true|false) click to toggle source

Determine whether there is a previous attribute.

    # File lib/libxml/attr.rb, line 74
74:       def prev?
75:         not self.prev.nil?
76:       end
siblings(node, &blk) click to toggle source

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
to_a() click to toggle source
     # 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
to_h() click to toggle source
     # File lib/libxml/attr.rb, line 104
104:       def to_h
105:         inject({}) do |h,a|
106:           h[a.name] = a.value
107:           h
108:         end
109:       end
to_s() click to toggle source
     # File lib/libxml/attr.rb, line 118
118:       def to_s
119:         "#{name} = #{value}"
120:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.