CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2008
    Posts
    5

    Unhappy Read webBrowser1 source and find text within HTML tags by id?

    Basically, I am making a web browser for my site. Inside my sites HTML, I have:

    <div id="browser_element_gold" class="browser-div">15 Gold</div>
    <div id="browser_element_coins" class="browser-div">81 Coins</div>

    Can I use C++ to get the web browsers source and find what is inside of the divs (15 Gold and 81 Coins) ?


    Thanks in advance,
    Bailey McAfee
    Bannana97
    Last edited by Bannana97; October 10th, 2010 at 11:00 AM.

  2. #2
    Join Date
    Jul 2009
    Location
    India
    Posts
    835

    Re: Read webBrowser1 source and find text within HTML tags by id?

    What do you mean by Web browser source ?. If you want to get any http source ie: html of a given url then you can use URLDownlodToFile API declared in urlmon.h.

  3. #3
    Join Date
    Dec 2008
    Posts
    5

    Re: Read webBrowser1 source and find text within HTML tags by id?

    I am using a Windows Form Application in Microsoft Visual C++ 2010.
    I have my IE-powered web browser on it.
    I know in Visual Basic you can get the source of the webbrowser.

    For example, you're on my website. My website has:

    <div>Hi</div>

    in it. The source is <div>Hi</div>...

    I need to look at this source and read between two html tags, one opening the html tag and one closing it, ex.

    <a id="mydiv">i need to find this</a>

  4. #4
    Join Date
    Dec 2008
    Posts
    5

    Re: Read webBrowser1 source and find text within HTML tags by id?

    I think for now all I need is to find out how to get webBrowser1's source in VC++ 2010 Windows Form App.

Tags for this Thread

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured