Tuesday, 15 March 2011

xslt - How to apply xml-stylesheet to JDOM2 Document -


Suppose you created your XML document using the JDMM2 library. What is the API to get XML-Stylesheet something:

     

I found the proper method call before I was fishing for a while . So here's the matter as if someone is watching well:

  document dock = ... map & lt; String, string & gt; M = new Hashmap & lt; String, string & gt; (); M.put ("href", "test.xsl"); M.put ("type", "text / xsl"); Doc.addContent (0, New Processing Instruction ("XML-Stylesheet", M)    

No comments:

Post a Comment