LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading HTML files on the web

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

0 Kudos
Message 1 of 7
(4,883 Views)

Hi Jim,

one solution is to read the entire web page with datasocket.

 

Mike

Message Edited by MikeS81 on 10-22-2008 08:38 AM
0 Kudos
Message 2 of 7
(4,862 Views)

"jimbo50" <x@no.email> wrote in message
news:1224625207538-796143@exchange.ni.com...
> 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?&nbsp;Jim

Check out the www.mooregoodideas.com/googlabviewstuff.htm . The WinInet
library can download anything, from HTML pages to executables and single
images. Use WinInet Easy GetUrl to get a quick start.

Regards,

Wiebe.


0 Kudos
Message 3 of 7
(4,853 Views)

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 

0 Kudos
Message 4 of 7
(4,842 Views)

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

 

 

 

 

0 Kudos
Message 5 of 7
(3,646 Views)

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.

------------------------------
Bill E. | Applications Engineer | National Instruments
0 Kudos
Message 6 of 7
(3,633 Views)

Ever Song,

 

Thanks. I'll be working on that. 

 

Jose

0 Kudos
Message 7 of 7
(3,622 Views)