use jsdom to parse xml when window is undefined