<?xml version="1.0" encoding="UTF-8"?> in my output

Hi,

I am parsing an XML file Using XSL.

BY using this:

transformerFactory tFactory = TransformerFactory.newInstance()

Transformer transformer = tFactory.newTransformer(new StreamSource("my.xsl"));

StringWriter sos =new StringWriter() ;

transformer.transform(new StreamSource("myyl.xml"), new StreamResult(sos));

I m able to parse but I am also getting <?xml version="1.0" encoding="UTF-8"?> in my output.

Could you please tell me how I can avoid it. Thanks!!

[526 byte] By [soumy] at [2007-9-26 12:39:35]
# 1
I doubt whether this will help U but I suggest when U use TrasformerFactory use the constant OMIT_XML_DECLARATION, this may help U
gigi_sam at 2007-7-2 12:00:21 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
Hi Gigi,Thanks a lot! It worked fine:)
soumy at 2007-7-2 12:00:21 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
Hello Soumya,Good to know it worked, I have got some doubts of using XPATH have U ever worked on that, let me know.Bye,Sam Mathew
gigi_sam at 2007-7-2 12:00:21 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...