0

I have a web service I would like to consume with Javascript. I've tried reading all the documentation on Jquery to do this using JSONP, however I believe this is only for Web Services that return JSON data?

A few questions. I have a web service that returns XML, it's a Rest web service. Do I have to use an XML client or if I try to use a JSON client will it just "figure it out"?

Is there a way to return Cross Site web services via Jquery via javascript in XML? I can't seem to find an example anywhere.

1 Answer 1

1

jQuery can load XML via ajax. http://api.jquery.com/jQuery.ajax/ Search for "dataType", there is an xml option. I believe you can use jQuery selectors to pull data out of the XML. I don't think there is a way to deserialize the XML to an object as part of jQuery, you'll need to extract the XML information manually.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.