xpath2 DOM 3 XPath 2.0 implementation for browsers and node.js based on xpath2.js DOM-agnostic XPath 2 language processor The xpath2 package API is compatible with the npm xpath package API Install with npm npm install xpath2 Run your first query console.log(xpath2.evaluate("1 + 2")); outputs 3