SHARE
TWEET

Untitled

a guest Jul 16th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. MyPojo myPojo = new MyPojo();
  2.  
  3. JAXBContext context = JAXBContext.newInstance(MyPojo.class);
  4. JAXBSource source = new JAXBSource(context, myPojo);
  5.  
  6. TransformerFactory factory = TransformerFactory.newInstance();
  7.  
  8. Transformer transformer = factory.newTransformer(new StreamSource(new File("my.xsl")));
  9.  
  10.  
  11. StreamResult output = new StreamResult(System.out);
  12. transformer.transform(source, output);
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