...
Of course, you can always ask an XSLt expert (i.e. me) to write you a style sheet...
Once you have your style sheet, copy in to the directory of your test class and add this code to your test class:
Code Block |
---|
String xml = ...;
URL url = TestClass.class.getResource("myxslt.xsl");
TextDispModel textDispModel = null;
try {
textDispModel = TextDispModel.newDefault(xml, url);
} catch (IOException e) {
e.printStackTrace();
} catch (TransformerException e) {
e.printStackTrace();
}
String html = textDispModel.getStyledData();
System.out.println(html);
|