NAN_METHOD(XmlDocument::New)
{
    Nan::HandleScope scope;

    Nan::Utf8String version(Nan::To<v8::String>(info[0]).ToLocalChecked());
    xmlDoc* doc = xmlNewDoc((const xmlChar*)(*version));

    XmlDocument* document = new XmlDocument(doc);
    document->Wrap(info.Holder());

    return info.GetReturnValue().Set(info.Holder());
}
NAN_METHOD(XmlDocument::New)
{
    Nan::HandleScope scope;

    Nan::Utf8String version(Nan::To<v8::String>(info[0]).ToLocalChecked());
    xmlDoc* doc = xmlNewDoc((const xmlChar*)(*version));

    XmlDocument* document = new XmlDocument(doc);
    document->Wrap(info.Holder());

    return info.GetReturnValue().Set(info.Holder());
}