/*
* call-seq:
* name
*
* Get the name of the node
*/
static VALUE name(VALUE self)
{
xmlTextReaderPtr reader;
Data_Get_Struct(self, xmlTextReader, reader);
const char * name = (const char *)xmlTextReaderConstName(reader);
if(name == NULL) return Qnil;
VALUE MAYBE_UNUSED(enc) = rb_iv_get(self, "@encoding");
return NOKOGIRI_STR_NEW2(name,
RTEST(enc) ? StringValuePtr(enc) : NULL);
}