How can we write the html tidy coding to insert the closing tag?
How can we write html tidy coding onl开发者_JAVA技巧y for inserting closing tag in the html file where closing tags are missing ?
I am parsing html tabular information using Html Agilitiy Pack. But where the ending tags are missing extracting information with html agility pack are not performed well. And if we write the ending tags manually and then we can extract the information perfectly with html agility pack.So I want to insert the closing tags where they are missing so html agility pack extracts the information perfectly.
Please See the accepted answer :
If Html File Has No Ending "/tr" Tag OR "/td" Tag Then HTML Agility Pack Does Not Read That Information Perfectly
tidy --hide-endtags=false
Looks like you need some Regex here.
精彩评论