How to return the value of the element using Xpath?

Asked

Viewed 81 times

-1

I’m doing a job for the college where I need to return the titles of the news site G1 - World. I am using Htmlagilitypack.

As an example, the first news of the site appears in this code snippet after viewing the element by browser.

inserir a descrição da imagem aqui

The news code is locating within several 'div’s' and returns "Htmlagilitypack.Htmlnodecollection" in my code in vs.

inserir a descrição da imagem aqui

I’m a little lost, how can I accomplish this return of the news headlines?

1 answer

-1

It might be useful for someone, too. I managed to return the headlines as follows:

inserir a descrição da imagem aqui

But it only returns 10 news.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.