/* * call-seq: * namespace_uri * * Get the URI defining the namespace associated with the node */ static VALUE namespace_uri(VALUE self) { xmlTextReaderPtr reader; Data_Get_Struct(self, xmlTextReader, reader); const char * uri = (const char *)xmlTextReaderConstNamespaceUri(reader); if(uri == NULL) return Qnil; VALUE MAYBE_UNUSED(enc) = rb_iv_get(self, "@encoding"); return NOKOGIRI_STR_NEW2(uri, RTEST(enc) ? StringValuePtr(enc) : NULL); }