is there an easy way to transform HTML into markdown with JAVA?
I am currently using the Java MarkdownJ library to transform markdown to html.
Use this XSLT.
If you need help using XSLT and Java here's a code snippet:
public static void main(String[] args) throws Exception {
File xsltFile = new File("mardownXSLT.xslt");
Source xmlSource = new StreamSource(new StringReader(theHTML));
Source xsltSource = new StreamSource(xsltFile);
TransformerFactory transFact =
TransformerFactory.newInstance();
Transformer trans = transFact.newTransformer(xsltSource);
StringWriter result = new StringWriter();
trans.transform(xmlSource, new StreamResult(result));
}