Html Agility Pack: make code look neat

前端 未结 3 1584
时光说笑
时光说笑 2020-12-06 17:33

Can I use Html Agility Pack to make the output look nicely indented, unnecessary white space stripped?

3条回答
  •  無奈伤痛
    2020-12-06 18:18

    A variation of this question has been answered recently

    • Which is the best HTML tidy pack? Is there any option in HTML agility pack to make HTML webpage tidy?

    Basically the outcome of this was that while you can use HtmlAgilityPack to clean it up a bit by using the fix nested tags.

    The best solution is to use something called Tidy which is an application that was originally created by some developers at w3c and then made open source. Its the engine that powers the w3c validator as well.

    This article covers how to use it but you had to sign up (free) to view it:

    • http://www.devx.com/dotnet/Article/20505/1763/

    It seems like a legit article but its funny because nobody else seems to have covered this topic in the last six years...

提交回复
热议问题