nodejs xpath
var fs = require('fs');
var xpath = require('xpath');
var dom = require('xmldom').DOMParser;
// Read the file:
var data = fs.readFileSync(file, { encoding : 'UTF-8' });
// Create an XMLDom Element:
var doc = new dom().parseFromString(data);
// Parse XML with XPath:
var childNodes = xpath.select('//path/to/node', doc);