How can I transform some HTML fragment into XHTML using groovy? -



How can I transform some HTML fragment into XHTML using groovy? -

i have input string containing html fragment next example

i have enever thought <b>those infamous tags</b>, born in <abbr title="don't acronym">sgml</abbr> realm, create way web of objects experience.

obviously, real 1 far more complex (including links, iamges, divs, , on), , write method having next prototype

string toxhtml(string html) { // have write here ? }

without description of input format, html-like stuff. parsing such mess gets ugly quickly. looks else did job already:

#!/usr/bin/env groovy @grapes( @grab(group='jtidy', module='jtidy', version='4aug2000r7-dev') ) import org.w3c.tidy.* def tidy = new tidy() tidy.parse(system.in, system.out)

use force, riduidel.

html xhtml groovy

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -