I am trying to make an app (in C#) in which I have to get some meanings from a website like wiktionary.com or dictionary.com. But I have never used Xml or worked with web pages at all.
I managed to get the response from the webpage (e.g from dictionary.com for a specific word) (which I hope is the xml format).
This is what I got for the word ‘Hello’.:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<!--attributes for answers reference-->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/">
<head>
<title>
Hello | Define Hello at Dictionary.com
</title>
<meta name="description" content="Hello definition, (used to express a greeting, answer a telephone, or attract attention.) See more."/>
<meta name="keywords" content="hello, online dictionary, English dictionary, hello definition, define hello, definition of hello, hello pronunciation, hello meaning, hello origin, hello examples"/>
<link rel="canonical" href="http://dictionary.reference.com/browse/hello"/>
<meta property="og:title" content="the definition of hello"/>
<meta property="og:site_name" content="Dictionary.com"/>
<meta property="og:image" content="http://sp2.dictionary.com/en/i/dictionary/facebook/dictionary_logo.png"/>
Now I want to parse the following string out of the response.
used to express a greeting, answer a telephone, or attract attention.
I tried using XmlReader but got stuck. Can somebody please help me read this content?
You can easily parse HTML with HTML Agility Pack.