/* * call-seq: * get(attribute) * * Get the value for +attribute+ */ static VALUE get(VALUE self, VALUE attribute) { xmlNodePtr node; xmlChar* propstr ; VALUE rval ; Data_Get_Struct(self, xmlNode, node); if(NIL_P(attribute)) return Qnil; propstr = xmlGetProp(node, (xmlChar *)StringValuePtr(attribute)); if(!propstr) return Qnil; rval = NOKOGIRI_STR_NEW2(propstr); xmlFree(propstr); return rval ; }