The problem is here:
function loadxmldata('Q1.xml'){
^^
When you declare a function you don't put strings or numbers in the parameter list. You define variables which would be populated when the function is invoked. By looking at your code I can see you're calling
xmlReq.open ('GET', URL, true);
which means your code is expecting a variable named
URL
which should be the name of the file. Therefore you need to adjust your script:
function loadxmldata(URL){
Then when you
call the function you would pass in the name of the XML file, like so:
loadxmldata('Q1.xml');
The
'Q1.xml'
will be populated into the
URL
variable and then used further down in the function.