I am using jquery Get request to retrieve data from a web service. The web service sends me back xml data such as <?xml version="1.0" encoding="utf-8"?>
<boolean xmlns="http://tempuri.org/">false</boolean>
How can I take this data and parse through it, also what if there are multiple nodes? can i convert this to json or something more readable and easy to parse? Thanks for any help
$.ajax({
type: "Get",
method: "GET",
url: "https://domain/MainService.asmx/LoginMobile",
contentType: "application/json; charset=utf-8",
data: parameter,
dataType: "jsonp"
EDIT: Here is my call. I would like to receive json data but this is coming back as xml.
[WebMethod(EnableSession = true)]
public bool LoginMobile(string userName, string password)
{
return Users.GetLoginInfo(userName, password);
}
EDIT:Webservice Method
if you want json then the best way would be to configure the server to send
jsonyou can use
.parseXML