I have created a servlet that does nothing more than create a XML file.

i have got some JQuery code that reloads the servlet to get the XML data.

This works fine and i am able to load the data i want, the problem i have is that when the data is loaded to the jsp page it displays [object Document] in front of my output.

Have i made a mistake on my jquery code?

Code JavaScript:
            $(document).ready(function() {
                setInterval(function() {
                	var data = "";
                    $.get('Stocks', function(data) {
                    		var row = $(this).find("row1").text();
                    		data = data + row;
                }, 1000); // 1000 milliseconds = 1 second.

XML file only has one value, called row 1 with the data, "wow this is cool", but my output is:

[object Document] wow this is cool