/* * 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); propstr = xmlGetProp(node, (xmlChar *)StringValuePtr(attribute)); rval = rb_str_new2((char *)propstr) ; xmlFree(propstr); return rval ; }