/* * call-seq: * local_name * * Get the local name of the node */ static VALUE local_name(VALUE self) { xmlTextReaderPtr reader; Data_Get_Struct(self, xmlTextReader, reader); const char * name = (const char *)xmlTextReaderConstLocalName(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); }