LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extract data (table) from a local HTML link to labview table

Hello, I have a local link HTML page, that containe a table of data. I want to extract all data of this table (string) to a labview table. Is't possible first ? :D if yes, can I have an example please ? best regards,
0 Kudos
Message 1 of 6
(5,543 Views)

HTML is just text.

You need to learn how to parse text.

0 Kudos
Message 2 of 6
(5,538 Views)
Hello, Thank you for your reply. I know how to parse HTLM. But I have a dynamic HTML page, and dynamic data in this page. So starting from a local link for this HTML page, how can I get the HTML source to parse it later ? And How can I refresh the HTML page to have the last data from it ? If you have an example, it would be better ! Thanks in advance.
0 Kudos
Message 3 of 6
(5,520 Views)

You may have a PHP or something like that generating the data that is displayed on the webpage.

But in the end, all that the browser "sees" is pure HTML text.

 

I don't have any code to share.

0 Kudos
Message 4 of 6
(5,511 Views)
Exactly. I have javascript functions that provide data in the HTML table. I just want to extract all the page as HTML (the result once the page is refreshed).
0 Kudos
Message 5 of 6
(5,506 Views)

Hello Blue_Strike,

 

I found a couple of options. You can use the Easy HTTP Client VIs, specifically the Get.vi, that uses an example on this link to obtain the coordinates using Google maps. If you just specify the URL of your HTML web page.

You could also work with Data Sockets. However, they don’t appear to support SSL/TLS protocols, as it doesn’t like URLs with https.

 

In case your HTML is document is offline, you can simply use the File IO VIs: “Open/Create/Replace File”, “Read from Text File” and “Close File”.

 

What I found out is that they read the HTML source code, not the actual body. Does the text you want to extract from the Javascript available in the source code?

 

If you want to refresh your web page programmatically to obtain always the latest information, I found an example that uses ActiveX calls to programmatically click buttons on a website, which is much more than you need, but you should be able to extract from the VI the functionality to load the web page continuously and then extracting the content you need.

Regards,
Daniel REDS
RF Systems Engineer

Help us grow.
If a post solves your question, mark it as The Solution.
If a post helps, give Kudos to it.
0 Kudos
Message 6 of 6
(5,495 Views)