IE's find

Hi,
Does anyone know how to implement Internet Browser's Find ? What i need is to write an application that displays a web page but i want the application to automatically find the string that i want. For example, a page that has a list of products sorted alphabetically and normally, to find a product on that page, we use IE's Find to find the string that we want. What i want to do is write an application that gets only the product's price that i want and show it on an edit box. I tried using the raw HTML data that i obtain from the page but the problem is that on certain page, it's doesn't show all the raw HTML data. Thanks.
Hsiang2kAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DanRollinsCommented:
I think you are talking about what is commonly known as "screen scraping" (for obscure historical reasons).  THis is a very common need and fortunatley is it very easy to do.

1) You need to get access to the HTML as a string of text in a variable in memory.  That is easy to do and from your question, it sounds like you know how to do that.  If you need help, just ask.

2) You next need to locate what I call a "sentinel" -- a piece of text that is unique but is very near to the text that you actually want.

To locate a sentinel, browse the page asn use the View Source context menu command.   You will almost certainly see some unique string of characters.  For instance:

      <TD align=right>Price:</TD> <TD>12.34</TD>

here a string such as
      "=right>Price:"
is your sentinel.  

3) Now just search your HTML string for that sequence.  Parse forward a few characters a viola!  ther is the text you need.

If you need more help, just ask.

-- Dan


DanRollinsCommented:
If from examining the View Source, you can determine that the datum you want has a name or ID, then there is another way.  Let me know...
-- Dan
Hsiang2kAuthor Commented:
Hi,
 The problem is that on some page, even using view source, it doesn't show all the HTML code and the product string is not in the html. if i go to a page that give me all it's HTML code, then i'll have no problem finding the string that i want.
What about MS Web browser ? That active x can show the page like IE but the problem is how to get the string that i want from the active x's display. Thanks.
CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

DanRollinsCommented:
>> even using view source, it doesn't show all the HTML code and the product string is not in the html.

If it is not in the HTML, then where is it?  
If you can't see it in View Source, then I don't know how you can even get started with your task.

Please provide a URL or a complete description of the data you can see in the browser and the data that you need to obtain for your program.

>> What about MS Web browser ?
Yes, you can use this.  I assumed that you knew how to do that, but I can show you how.  However, we can't even start on that process without *first*  being able to pinpoint the desired data by looking at View Source.

-- Dan

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DanRollinsCommented:
hi Hsiang2k,
Do you need more help?  Please communicate with the Experts who are helping you.  Thanks!
-- Dan
tinchosCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: DanRollins {http:#9723880}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.