    /*
     * call-seq:
     *   xml_version
     *
     * Get the XML version of the document being read
     */
    static VALUE xml_version(VALUE self)
    {
      xmlTextReaderPtr reader;
      const char *version;

      Data_Get_Struct(self, xmlTextReader, reader);
      version = (const char *)xmlTextReaderConstXmlVersion(reader);
      if(version == NULL) return Qnil;

      return NOKOGIRI_STR_NEW2(version);
    }