Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Groovy's XML capabilities are powerful enough that you may not need to consider other alternatives such as XSLT. If you wish to use XSLT though, it isn't hard to do. Here we just added xalan and serializer jars from the Apache Xalan-J project to our CLASSPATH. Depending on your JVM version and other available libraries, you may need slightly different jars. Once our path is set up, we can run the following script to convert an XML file into XHTML:

Here is the output (pretty-printed):

  • No labels