Below is the code that I came up with while I was preparing for my GRE exams, I wanted a program that would take a word as input and then fetches the meaning for that word from online. I used Merriam Webster’s api to get the XML and parsing it using the DOM parser.
You have to replace the apiKey with the key that would be provided by the Merriam when you signup for the service. For personal use the service is free and is limited to a 1000 words per day which worked for me. Hope this helps to at least one of you guys 🙂