console.log('xmlCap.js has loaded...'); function captureXML() { var xhr = new XMLHttpRequest(); xhr.onload = function() { var btn = document.getElementsByTagName('button')[1], btnTxt = btn.textContent, div = document.getElementById('capturedXML'), content = '', check = div.innerHTML == content; if (check) { if (xhr.status >= 200 && xhr.status < 400) { var data = xhr.responseXML.getElementsByTagName('expense'); content += '
| COMPANY EXPENSE | ||
|---|---|---|
| Category | Group | File for Tax |
| ' + data[d].getElementsByTagName('category')[0].textContent + ' | '; content += '' + data[d].getElementsByTagName('group')[0].textContent + ' | '; content += '|