get_attribute( name ) public

Fetches an attribute


the name by which to search for the attribute. Can be a prefix:name namespace name.


The first matching attribute, or nil if there was none. This

value is an Attribute node, not the String value of the attribute. doc = ‘<a x:foo=“1” foo=“2” bar=“3”/>’ doc.root.attributes.get_attribute(“foo”).value #-> “2” doc.root.attributes.get_attribute(“x:foo”).value #-> “1”

Show source
Register or log in to add new notes.