NAN_METHOD(XmlDocument::Version)
{
    Nan::HandleScope scope;
    XmlDocument *document = Nan::ObjectWrap::Unwrap<XmlDocument>(info.Holder());
    assert(document);

    if (document->xml_obj->version)
        return info.GetReturnValue().Set(Nan::New<v8::String>((const char *)document->xml_obj->version,
                    xmlStrlen((const xmlChar*)document->xml_obj->version)).ToLocalChecked());

    return info.GetReturnValue().Set(Nan::Null());
}
NAN_METHOD(XmlDocument::Version)
{
    Nan::HandleScope scope;
    XmlDocument *document = Nan::ObjectWrap::Unwrap<XmlDocument>(info.Holder());
    assert(document);

    if (document->xml_obj->version)
        return info.GetReturnValue().Set(Nan::New<v8::String>((const char *)document->xml_obj->version,
                    xmlStrlen((const xmlChar*)document->xml_obj->version)).ToLocalChecked());

    return info.GetReturnValue().Set(Nan::Null());
}