尝试使用https://www.npmjs.com/package/xpath
var xpath = require('xpath');
var xpath_select = xpath.useNamespaces({
"my": "http://my.com/core/api"
});
module.exports.handler = function (request, context, callback) {
...
xpath_select(...)
...
};
我应该将xpath_select初始化移动到处理函数还是我可以在启动时初始化它一次?
我知道多线程问题。