10-21-2008 04:31 PM
How can I read an HTML on the web and extract data from the HTML file into my VI. I am using SHDocVw.IWebBrowser2 activeX control to access the web page but I cannot figure out how to read the HTML into my VI. Is there an easy way to do this?
Jim
10-22-2008 01:37 AM - edited 10-22-2008 01:38 AM
Hi Jim,
one solution is to read the entire web page with datasocket.
Mike
10-22-2008 05:10 AM
10-22-2008 10:47 AM
Dear jimbo50,
There is also the URL Get HTTP Document VI, which retrieves a document specified by an http URL and stores it in a specified file or returns the contents as a string. You would then have to parse the string to retrieve the data that you required, and if the website formatting changes, it may break your text parsing code.
Best Regards,
~Nate
05-15-2012 02:32 PM
Nate.H,
I was actually doing that to get some information from a website. I see that the way that I'm parsing the data (using Match Patternis) taking a while give me the result. I know that the original HTML document it quite big, but is there a quick and efficient way to parse this data?
Thanks,
Jose
05-16-2012 07:16 PM
Hi Jose Perez,
First off, are you repeatedly searching the string for certain patterns, or just searching the string for the specified pattern once? If possible, your best bet may be to only search part of the string if you know that it will be in a consistent format, thereby eliminating large sections of the string. If you are searching in a cascading order (searching for one pattern that is always before the next ones), then you could split the string at the first pattern and only search the latter portion.
Also, you might want to consider making a new post since this thread is four years old.
05-17-2012 08:03 AM
Ever Song,
Thanks. I'll be working on that.
Jose