Code example for StreamSource

Methods: setSystemId

0
		} catch (TransformerConfigurationException e1) {
			logger.error("Transformation 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("Transformation error:"+e.getMessage());
		} finally { 
			 
		} 
	} 
	 
	@Test 
	public void testCreateConfigParam() throws Exception{ 
		File confFile = new File("src/main/webapp/message-configuration/Observarion-conf.xml");
		streamSerializer = new XStream();
		streamSerializer.processAnnotations(ConfigGeneratorParam.class);
		ConfigGeneratorParam param = (ConfigGeneratorParam) streamSerializer.fromXML(confFile);