[jQuery] Get XML value from web service call
I need to pass an XML file (KML) to a google earth API method.
In the following example (http://earth-api-samples.googlecode.com/svn/
trunk/examples/kml-parse-interactive.html), it takes the xml from a
textarea like this:
var kmlBox = document.getElementById('kml-box');
var kmlString = kmlBox.value;
where 'kml-box' is the textarea.
In my application I'm receiving the XML file (KML) from a web service.
I'm using $.get to call the web service and the file is received
correctly. The problem is how to get the xml text itself. I've tried
the same approach but "value" is not a property of the xml returned by
$.get.
$.get("WebService", { param1: param_1, param2: param_2 }, function
(xml) {
return xml.value;
});
Any idea?
Thanks a lot for your attention.