I'm trying to master AJAX.  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/SVG_Data.xq";);
 My_Data.send();
 document.getElementById("Information").value = My_Data.responseXML;

}

This is my XML

<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 open my webpage, nothing appears in the textbox.  Am I doing
something wrong?

Reply via email to