Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Apr 2014
    Posts
    18

    Retrieving specific dynamic information from a web site

    I am trying to design an App that will allow me to pull information from a specific website and display it in the way I designed it. The information includes text and an image and a URL.

    For example, if we look at the website www.nokia.com we see the html code:

    <a title="Nokia Lumia 625" href="http://www.nokia.com/gb-en/phones/phone/lumia625/offers/">
    <img class="lazy" alt="Nokia Lumia 625" src="//i.nokia.com/r/image/view/-/2719600/extraHighRes/4/-/2-Homepage-Hero-Banner-Max-Product-1500x1500--1--jpg.jpg">
    <h1 class="headline brand-headline">Nokia Lumia 625</h1>

    What I basically want to do is take the text included in either the 'a title' or 'h1' ID and display it in my app - I can't just write the text as the website I want data from changes the text within these ID's frequently.

    I also want to take the image displayed within 'img src' and display it within my app - again this changes frequently but the 'img src' is of course static.

    Then I also want to take the url from 'a href' and link that to a button in my app.

    Any help on this would be greatly appreciated.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,809

    Re: Retrieving specific dynamic information from a web site

    Well, just to make sure: there is a Web control which can render Web pages for you, though in this case the complete page will be there, not just parts of it.
    Otherwise you will have to parse the page (or have it parsed), see http://developer.nokia.com/community...TMLAgilityPack for some ideas.

  3. #3
    Regular Contributor
    Join Date
    Oct 2013
    Location
    Pennsauken, NJ, USA
    Posts
    126

    Re: Retrieving specific dynamic information from a web site

    I will also highly recommend HTMLAgilityPack... you can get it from NuGet. It's a little hard to use at first, but the tutorial posted above should help. Also, if you are more familiar with LINQ, you can avoid using XPath completely. It's not quite as powerful, but I have been able to do everything I've ever needed using LINQ.

  4. #4
    Registered User
    Join Date
    Apr 2014
    Posts
    18

    Re: Retrieving specific dynamic information from a web site

    Thanks guys, I will take a look at that.

    I was recommended to use httpwebrequest in the past, would this be along the right lines?

  5. #5
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    529

    Re: Retrieving specific dynamic information from a web site

    With the HttpWebRequest you can get the plain HTML-text of the website. The HTMLAgilityPack is a means to extract information from the HTML-text of a website.

  6. #6
    Registered User
    Join Date
    Apr 2014
    Posts
    18

    Re: Retrieving specific dynamic information from a web site

    Thank makes sense, thanks SB.

Similar Threads

  1. Retrieving GPS information
    By ashraf fawzy in forum Symbian
    Replies: 5
    Last Post: 2011-06-04, 10:06
  2. Retrieving information from a DB
    By hm991 in forum Mobile Java General
    Replies: 11
    Last Post: 2010-03-23, 19:50
  3. Retrieving SIM information
    By kedarm in forum Symbian
    Replies: 9
    Last Post: 2009-12-28, 08:27
  4. Retrieving device specific properties on Series40 E3 handset
    By Nidhi in forum Mobile Java General
    Replies: 1
    Last Post: 2007-12-14, 12:42
  5. Retrieving File Information
    By parisn in forum Symbian
    Replies: 2
    Last Post: 2003-12-31, 01:43

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×