Pergunta

Looking to format (automated, in application) some html / nvelocity templates. Tidy seems to be the answer for this, however all the .Net ports seem to be problematic and not very well maintained. Most rely on unmanaged code under the covers and that starts imposing other restrictions on the project.

For example, to use the code associated with http://www.codeproject.com/KB/mcpp/eftidynet.aspx, the projects now has to be a x86 build.

Is there a new preferred solution for doing this? Or is there a completely managed port of TidyHtml that understands nvelocity or allows custom token definition?

Foi útil?

Solução

Let's list them:

  • EfTidy
  • ZetaHtmlTidy (mixed-mode, so it needs different assemblies for x86/x64)
  • tidyfornet (managed assembly but depends on external HTMLTidy native dll)
  • TidyATL (ATL wrapper, old, unmaintained, I think it's also mixed-mode and it even requires COM registration?)
  • TidyNet (fully-managed DLL, no external dependencies)

Outras dicas

Even though it's old and unmaintained, I'm using TidyNet because it's fully managed. Does the job just fine.

BTW: Tidy and NVelocity are completely unrelated. I'd never process NVelocity templates with Tidy as it will probably break them... However you might want to run Tidy to the resulting html after processing the NVelocity template.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top