An import and conversion of an older luaxml implementation for lua5