Code example for Transformer

Methods: setParametertransform

0
		 
		Transformer tr = null;
		try { 
			tr = tFactory.newTransformer(source);
			/*File list = new File(((String)tr.getParameter("baseDirFullPath")).concat(((String)tr.getParameter("baseDirFullPath"))))*/ 
			tr.setParameter("helper",  new XSLHelper());
		} catch (TransformerConfigurationException e1) {
			logger.error("TransformationConfiguration error: "+e1.getMessage());
		} 
		try { 
			StreamResult result = new StreamResult(out);
			StreamSource docSrc = new StreamSource(xml);
			docSrc.setSystemId(xml);
			tr.transform(docSrc, result);
		} catch (Exception e) {
			logger.error("Unable to transform: "+e.getMessage());
		} finally { 
			 
		} 
	}