06-20-2018 04:09 AM
Hi all
i'm trying to transfer data from a web page to labview and i'm using GET.VI after that i'm using Match Pattern.vi to parse the usefull data out from that long string results
i have a problem in prasing data
any help please
Thanks
06-20-2018 04:27 AM - edited 06-20-2018 04:27 AM
06-20-2018 06:17 AM
Hi Gred W ,
sorry if i didn't expalin well so i mean the data in the tab in the web page as shown in the capture when i run the VI i have Nothing in my tab.
thanks
06-20-2018 06:31 AM - edited 06-20-2018 06:32 AM
Hi Ahmed,
when I run your VI with the string constant I get this result:
There are results: You only need to increase the size of the string indicators!
(Switching to a different display mode of those strings might help too.)
06-20-2018 07:07 AM
thanks for the response but as you can notice in my boucle while i stop when the length of my html text is zero in fact i need to prase data for the 12 Ports but i only get results only for X1 ?
06-20-2018 07:26 AM - edited 06-20-2018 07:31 AM
Hi ahmed,
i only get results only for X1 ?
Maybe you need to search for X2, X3, and so on?
Are you sure your search criteria is correct all the time?
Edit:
You are searching for a constant 'id="port label_0"', while this label changes for each item in the HTML table to label_1, label_2m and so on.
Did you even compare your search criterias with the actual HTML text?
06-21-2018 03:41 AM
Hi GredW ,
Yes exactly that's the problem i was using this other devices to transfer ports informations in which i have the same constant string before port name , any ideas please on how can i extract all ports informations from this html text .
this is my last VI version
Best Regards
Ahmed
06-21-2018 04:03 AM
Hi Ahmed,
any ideas please on how can i extract all ports informations from this html text .
As already said before: you need to search for incrementing port labels!
Searching for a constant "label_0" will always result in just the first entry found!
Quick fix: search for "port_label_"…
06-21-2018 04:18 AM - edited 06-21-2018 04:40 AM
Hi Gred W ,
thanks but in the port indicator i need to display only port name " X1" for example but like that it will display :
0"
>
X1
also the same problem with link parameters when it's UP and Down i don't have the same constant string .
Best Regards
Ahmed
06-21-2018 05:41 AM
Hi Ahmed,
i don't have the same constant string .
As you know what you are looking for you can create your search algorithm accordingly.
(This is much easier than to parse unknown text…)
- You know the generic structure of your HTML text, so you can easily parse single rows of your table.
- In each row you know the number and expected content of each cell.
So create an algorithm to get table rows, then parse each row…