SHARE
TWEET

Untitled

a guest Jun 12th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             StreamSource input = new StreamSource(new File("./filesCase/case"+this.id+".xml"));
  2.             StreamSource xslCode = new StreamSource(new File("./filesCase/resultFromCase.xsl"));
  3.             TransformerFactory tf = TransformerFactory.newInstance();
  4.             Transformer trans;
  5.             StringWriter sw = new StringWriter();
  6.             try {
  7.                 trans = tf.newTransformer(xslCode);
  8.                 trans.transform(input, new StreamResult(sw));
  9.             } catch (TransformerException ex) {
  10.                 Logger.getLogger(Case.class.getName()).log(Level.SEVERE, null, ex);
  11.             }
  12.  
  13.             String result = sw.toString();
  14.             return result;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top