This is my Javascript code:
var Data_Display
var My_Data
function Setup() {
My_Data = new XMLHttpRequest();
My_Data.open("GET","http://localhost:8080/exist/rest/db/apps/HTML_Student/Database_Example.xq");
My_Data.send();
document.getElementById("Information").value = My_Data.responseXML;
}
This is my XML code:
<xml>
<svg>
<svg_data>100</svg_data>
</svg>
</xml>
This is my XQuery:
xquery version "3.0";
for $Data in doc("Database_Example.xml")/xml/svg/svg_data
where $Data = 100
return $Data
When I ran the Javascript code, the computer gave me an Access Control Allow Origin error. It told me that I needed a CORS request. Since I have no idea what a CORS request is or how to insert it into my code, I'm stuck. Can anyone assist me?