/*
* call-seq:
* attribute_at(index)
*
* Get the value of attribute at +index+
*/
static VALUE attribute_at(VALUE self, VALUE index)
{
xmlTextReaderPtr reader;
xmlChar *value;
VALUE rb_value;
Data_Get_Struct(self, xmlTextReader, reader);
if(NIL_P(index)) return Qnil;
index = rb_Integer(index);
value = xmlTextReaderGetAttributeNo(
reader,
(int)NUM2INT(index)
);
if(value == NULL) return Qnil;
rb_value = NOKOGIRI_STR_NEW2(value);
xmlFree(value);
return rb_value;
}