attribute (Nokogiri::XML::Node)

    /*
     * call-seq:
     *   attribute(name)
     *
     * Get the attribute node with +name+
     */
    static VALUE attr(VALUE self, VALUE name)
    {
      xmlNodePtr node;
      xmlAttrPtr prop;
      Data_Get_Struct(self, xmlNode, node);
      prop = xmlHasProp(node, (xmlChar *)StringValuePtr(name));

      if(! prop) return Qnil;
      return Nokogiri_wrap_xml_node(Qnil, (xmlNodePtr)prop);
    }