/*
* call-seq:
* xml_version
*
* Get the XML version of the document being read
*/
static VALUE xml_version(VALUE self)
{
xmlTextReaderPtr reader;
Data_Get_Struct(self, xmlTextReader, reader);
const char * version = (const char *)xmlTextReaderConstXmlVersion(reader);
if(version == NULL) return Qnil;
return NOKOGIRI_STR_NEW2(version, "UTF-8");
}