views:

114

answers:

3

How can we write html tidy coding only 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.

A: 

Looks like you need some Regex here.

ydobonmai
A: 

tidy --hide-endtags=false

David Dorward
@David DorWord Sir,The statement you have expressed above is in html agility pack or in tidy pack ? Because I can not find the option you have specified above.
Harikrishna
It is part of HTML Tidy.
David Dorward
@David DorWord,Sorry but is there any option in html agility pack to tidy the html page or inserting missing optional ending tags because if there are missing ending tags agility pack does not parse information properly.
Harikrishna