0

I want to make an API call where the response is in XML format.

This is the API description: http://www.dictionaryapi.com/products/api-collegiate-dictionary.htm

I have registered and I have a key to use in the request URL.

Could anyone give me an idea of how to make the call and analyse the response?

Thankyou.

2

1 Answer 1

1

Something along the lines of:

var request = WebRequest.Create("http://www.dictionaryapi.com/api/v1/references/collegiate/xml/hypocrite?key=1234");
var response = request.GetResponse();    
var xdoc = XDocument.Load(response.GetResponseStream());

Then you can grab what you need like:

xdoc.Element("ElementName");
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.