Developing valid xhtml document from unformed html
I want to develope the valid xhtml doc the input doc is not well formatted i managed to correct some errors but stuck up in condition like
<span>......<p></span>...</p>
there can be any tags in place of span and p......but condition is as mentioned i want to handle this condition i m new in .net c# plz do the needful.... thanx.
xhtml converter
It's nice tool for validating and correcting xhtml...
Use the w3c validator and fix problems as you find them. Automated tools would be of limited help since if the markup is malformed they can't really determine what you meant.
You can try with HTML agility pack. It is a somewhat tolerant parser but I am quite sure that it will not produce good-looking output for all situations.
Try HTML Tidy. Input the code in the html field. Make sure "Output XHTML" is checked. And then click on the green Tidy link with an arrow. It will give you warnings and errors that you can then correct.
精彩评论