U
U
Uncle Bogdan2021-06-04 13:12:49
Parsing
Uncle Bogdan, 2021-06-04 13:12:49

Why is the content of a completely different span being copied?

Like I want to highlight the content ( text ) of this span:
60b9fc0c80ffa933913080.png
But why does it still copy what is in it, only another span ( 299011, Russia, Sevastopol, Sevastopol, Gogol St., 22 )
How to remove it?

Site

photo from the program:
60b9fc549c071082235445.png

Code:

node = doc.DocumentNode.SelectNodes("//*[@id='gr_case_partps']/table/tbody/tr/td[1]/div/ul/li/span");

                        SetTextToControl(Plaintiffs, "Истцы:\n" + node[0].InnerText.Trim());

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-06-04
@motkot

These two spans are nested inside each other, so the text inside the second span is part of the text of the first one.
You can remove this text if you remove this span from the DOM

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question