Skip to main content

All Questions

0 votes
1 answer
27 views

How to get Tag inner text and Attribute value in the same loop and row HtmlAgilityPack C#

Following is the HTML i am working on; (C# project) </TR> <TR> `<TD ALIGN="center"> <INPUT TYPE="checkbox" NAME="f0" VALUE="14652 4-76-...
Fazlan Fawmy's user avatar
0 votes
1 answer
37 views

How to select node where descendant node has attribute

I am parsing an html email. I need to get the href property from the following html: <a href="https://sample.com/us/en/suv-rental/united-states/orlando-fl/jeep/grand-cherokee/12345" ...
Greg Gum's user avatar
  • 36.6k
0 votes
2 answers
97 views

XPath html nodes with custom namespace attributes

I use c# .NET 6 with HtmlAgilityPack Nuget Package version 1.11.46 installed and i am facing the following problem: <span my:fdivid="1">Test1</span> // should be selected <...
CrazyEight's user avatar
1 vote
2 answers
205 views

HtmlAgilityPack - Select descendant until element with class

I'm using HtmlAgilityPack in my C# application to scrape some HTML code. But I'm having issues selecting a particular tag. This is the HTML that I have: <div class="Post"> <img ...
user avatar
0 votes
0 answers
26 views

How To Join Two xPaths In One Single Collection?

var processorTitles = document.DocumentNode.SelectNodes("//div[@class='pad-hrz-xs']/a[@data-zone='title']"); var processorsPrices = document.DocumentNode.SelectNodes("//div[@class='card-...
VLAD_W47FK's user avatar
1 vote
0 answers
17 views

My XPath with double slash always selects same element from HtmlAgilityPack result [duplicate]

I'm trying to scrap the list of music for a given date from the billboard website. When I obtain a list of div for each music I'm trying to get the title and the artist for each div, but in my foreach ...
Marco Favaretto's user avatar
1 vote
2 answers
258 views

How to get first occurence of src with HTML Agility Pack

due to invalid formatting of xmls I have, I'm using HTML Agility Pack. I am parsing for example this feed: https://www.rioseo.com/feed/ I have an array of these elements (so the "src" are ...
Mi Yahn's user avatar
  • 23
1 vote
1 answer
85 views

Cant get Innertexts from webpage using html agility pack xpath in c#

So this is my code guys. Im trying to get the text inside a span and storage it locally. Im using html agility pack and trying to retrieve the text using xpath but the nodes dont retrieve anything and ...
Alejandro de la Riva's user avatar
-2 votes
1 answer
55 views

Select text strings with multiple formatting tags within

Context: VB.NET application using htmlagility pack to handle html document. Issue: In a html document, I'd like to prefixe all the strings starting with # and ending with space by an url whatever ...
8oris's user avatar
  • 383
0 votes
1 answer
30 views

Html Agility Pack search all nodes and save them

I shall search over whole website entries with "00:00-00:01" and replace with "" , like below. <td id="tb"> Fr, 3.Sep.2021 00:00-00:01 </td>...<td id=&...
hermanvonsalza nogat's user avatar
1 vote
1 answer
109 views

Using Xpath/HtmlAgilityPack to insert markup a quarter of the length down the page...program is hanging

I'm using HtmlAgilityPack to get the word count a quarter of the length down a page using asp.net Core MVC to view the word lengths/urls returned from the controller, and choosing whatever that ...
jmath412's user avatar
  • 469
0 votes
0 answers
88 views

Xpath seems to exist but the element cannot be found through code

I am trying to fetch an element using HTML Agility Pack (C#) but it keeps returning null. The HTML looks like this (sorry for the image). I can successfully find the first node I marked with the arrow ...
Cappic's user avatar
  • 9
0 votes
1 answer
30 views

cannot get paragraph with HtmlAgilityPack

I have this piece of html: <p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:8.5pt; font-family:"Arial",sans-serif;mso-fareast-font-family:"Times New Roman"'>1. A ...
derstauner's user avatar
  • 1,716
0 votes
1 answer
207 views

HTML Agility and Powershell (chech contains xPath)

I try to check containing "span iteamprop" in div with class = f6 color-text-secondary mt-2 using the following command, but it doesn't work: $paragraphs = $doc.DocumentNode.SelectNodes(&...
Smile's user avatar
  • 39
0 votes
0 answers
49 views

Can't read xpath null html agility pack c#

I am new to html agility pack, and I am trying to read href attribute with link, but the problem is that it returns null. I don't know what I am doing wrong. That is my code: [and I wanted to get this ...
D3FALT404's user avatar

15 30 50 per page
1
2 3 4 5
39