Hai all
Hai all
Thanks in advance
I have also tried with the following code snippet.But I could not get the
pdf.Please help me .What is the actual problem.If I use both xml and xsl as
file it will work properly
xsl is a string variable that conatins my xsl contents
xml is a string variable that conatins my xml contents
Source streamSource = new StreamSource(xsl);
Source saxSource = new SAXSource(new InputSource(new
StringReader(xml)));
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
driver.setOutputStream(outStream);
TransformerFactory tf = TransformerFactory.newInstance();
Transformer transformer = tf.newTransformer(streamSource);
Result result = new SAXResult(driver.getContentHandler());
transformer.transform(saxSource, result);
byte[] content = outStream.toByteArray();
res.setContentLength(content.length);
res.setContentType("application/pdf");
res.getOutputStream().write(content);
res.getOutputStream().flush();
outStream.close();
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]