How can i remove a tag from an node while i’am looping through the node collection
I’am in the loop though a complex document with
For Each node As HtmlNode In document.DocumentNode.SelectNodes("//section/div[3]/section/article")
then i get an address string which i split in this way
adress = Split(node.SelectSingleNode("./div[2]/div").InnerHtml, "<br>")
But sometimes i have some advertising in this adress which is coming from a tooltip which always starts with a “span” Tag
How can i remove this before i split the result from the node?
example befor i split the result looks normaly
88989 <br> myCity <br> mySTreet <br> address
in some cases the result looks like
88989 <br> myCity <span>mycity is a nice city<br> Visit us </span> <br> mySTreet <br> address
Ok, got it to work with