I need to convert HTML4 input to valid XHTML (strict) in PHP5 for further processing (SAX for instance). Any suggestions?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The PHP Tidy extension should be able to do the job.
Here's a good article about it: Tidying up your HTML with PHP 5.