code: function _split(source) {
    var buf = [];
    var reg = /'[^']+'|"[^"]+"|[^\s/=]+=?/g;
    reg.lastIndex = 0;
    var match = reg.exec(source);
  
    while (match) {
      buf.push(match);
      match = reg.exec(source);
    }
  
    return buf;
  }
docs: adapted from https://github.com/jindw/xmldom