开发者

Developing valid xhtml document from unformed html

开发者 https://www.devze.com 2023-01-17 16:44 出处:网络
开发者_开发知识库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
开发者_开发知识库

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消