Welcome Guest Search | Active Topics | Sign In | Register

Example to use a Function and locate the Classes and extract data Options
Prequena84
Posted: Monday, June 28, 2021 11:55:45 AM
Rank: Advanced Member
Groups: Member

Joined: 5/10/2021
Posts: 43
Hello good morning, I am currently replicating a data query through Html Element locating the CLASSNAME and I need to have a clearer idea of how to extract a series of classes with the same name from all HTML Document, this would be a fragment of the example html :




1st search

<div class="product_info">

<div class="product_name">

<span class="marca">MOEN</span> ( Innertext result)

<a aria-hidden="true" tabindex="-1" id="WC_CatalogEntryDBThumbnailDisplayJSPF_10142_link_9b" href="/banos/accesorios-para-bano/accesorios-de-pared/portarrollo-iso-niquel-995841">PORTARROLLO PARA BAÑO DE METAL PLATA</a> </div> <a href="/banos/accesorios-para-bano/accesorios-de-pared/portarrollo-iso-niquel-995841" class="raiting"> <span class="stars-content-off"> <span class="stars-content"> <span class="starOff"></span> <span class="starOff">
</span>

.......

2nd search

<div class="product_info">

<div class="product_name">

<span class="marca">HELVEX</span> ( Innertext result)

<a aria-hidden="true" tabindex="-1" id="WC_CatalogEntryDBThumbnailDisplayJSPF_10142_link_9b" href="/banos/accesorios-para-bano/accesorios-de-pared/portarrollo-iso-niquel-995841">PORTARROLLO PARA BAÑO DE METAL PLATA</a> </div> <a href="/banos/accesorios-para-bano/accesorios-de-pared/portarrollo-iso-niquel-995841" class="raiting"> <span class="stars-content-off"> <span class="stars-content"> <span class="starOff"></span> <span class="starOff">
</span>


......


Obviously with the idea I can adapt these parameters for the following searches, the idea is that the function can read line by line within the document to extract the data of the brands of the articles within the customer's inventory since they are inside some classes and i need to learn how to search those classes with the evalscript functions, thanks a lot


eo_support
Posted: Monday, June 28, 2021 1:17:39 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
Hi,

You will need to do this with JavaScript code. Not on the .NET side. Once you have the correct JavaScript code, you can call WebView.EvalScript to run the script code and get the result. See here for more details:

https://www.essentialobjects.com/doc/webbrowser/advanced/js.aspx

Thanks!
Prequena84
Posted: Wednesday, June 30, 2021 2:51:35 PM
Rank: Advanced Member
Groups: Member

Joined: 5/10/2021
Posts: 43
Hello good afternoon, I was reviewing the content that you indicated to me and I do not see any single example of executing a code to locate a Class by its name and extract the text of those classes, and take it to .net, I really need an example of how to identify a class and extract any data from the tag inside the Webview but how can I extract the gethtml as an html document with both ideas I can solve a problem that a client has, if you can't provide me with the solution, who can I ask? Can't it be that your demo or manual don't have that information? thanks a lot.
eo_support
Posted: Wednesday, June 30, 2021 5:12:27 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
Hi,

We have already clearly told you that you need to do that with JavaScript. JavaScript is a general Web page programming language. So you questions would be "how to locate a class by its name and extract the text of those classes with JavaScript". This is a general web programming question and would not have anything to do with .NET or our product. Obviously we are not in a position to support you on such questions. As such you will need to seek other resources for such questions.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.