Closed mrtcode closed 5 years ago
While var xpathObject = dom.window.document.evaluate('/html/head/meta', dom.window.document, null, 5, null);
var xpathObject = dom.window.document.evaluate('/html/head/meta', dom.window.document, null, 5, null);
results to the same order as meta tags in the document,
var xpathObject = dom.window.document.evaluate('/html/head/meta/@content', dom.window.document, null, 5, null);
results to reversed order.
The difference is the @content attribute in xpath. And it results to reversed authors in many items translated with EM translator.
@content
The problem doesn't exist when querying the same xpath in browser.
Example website: https://www.cell.com/abstract/S0092-8674(11)00581-2
While
var xpathObject = dom.window.document.evaluate('/html/head/meta', dom.window.document, null, 5, null);
results to the same order as meta tags in the document,
var xpathObject = dom.window.document.evaluate('/html/head/meta/@content', dom.window.document, null, 5, null);
results to reversed order.
The difference is the
@content
attribute in xpath. And it results to reversed authors in many items translated with EM translator.The problem doesn't exist when querying the same xpath in browser.