Click here to Skip to main content
15,886,680 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
C#
string url = "http://dictionary.cambridge.org/dictionary/british/appeal";
        HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
        WebRequest request = WebRequest.Create(url);
        WebResponse response = await request.GetResponseAsync();
        StreamReader stream = new StreamReader(response.GetResponseStream());
        string content = await stream.ReadToEndAsync();

        List<string> list = new List<string>();
        ...
        foreach (...)
        {
           ...
        }

HTML
<span class="sense-body">

    <span class="def-block">
        <span class="def-head">
            <span class="def-info"></span>
            <span class="def">

                a 

                <a class="query" title="request" href="http://dictionary.cambridge.org/dictionary/british/request"></a>

                 to the 

                <a class="query" title="public" href="http://dictionary.cambridge.org/dictionary/british/public"></a>

                 for 

                <a class="query" title="money" href="http://dictionary.cambridge.org/dictionary/british/money"></a>

                , 

                <a class="query" title="information" href="http://dictionary.cambridge.org/dictionary/british/information"></a>

                , or 

                <a class="query" title="help" href="http://dictionary.cambridge.org/dictionary/british/help"></a>

                : 

            </span>
        </span>
        <span class="def-body"></span>
    </spa


How to do that to get that results: a request to the public for money, information, or help

Im using HttmpAgiliPack on windows phone 8.1 runtime.Thanks

Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900