I would like to find a range with a specific identifier and get the inner text. But I can’t find a way to do this.
can anyone help me with this
You can try something line by line:
var doc = new HtmlDocument(); doc.Load("foo.html"); var node = doc.DocumentNode.SelectSingleNode("//span[@id='foo']"); if (node != null) { var innerText = node.InnerText; }
I personally prefer turning it all into an XElement and requesting it this way using Html Agility. Lighter than xpath IMHO. But Darin is responding to work
Source: https://habr.com/ru/post/1369582/More articles:How can I simulate a peer-to-peer communication channel using PHP, MySQL DB and JavaScript? - javascriptJQuery on / off button in IE7 - jqueryWhat are the disadvantages of using the syntaxHighlight html element with specific id in javascript or jquery - javascriptThe distance function for SQLite in iOS 5 is very slow - sqliteOpenGL ES 2.0 Equivalent for ES 1.0 Circles Using GL_POINT_SMOOTH? - circlein bash script, unexpected “syntax error: unexpected end of file” in if statement - linuxOpenGL ES 2.0 with iPhone: GL_POINT_SMOOTH draws squares with ES 2.0, but works in ES 1.0 - shaderhow to convert characters like these, "a³ a¡ a'a§" to unicode using python? - pythonFull screen display time of the week - fullcalendarAll Articles