Jim O'Neill wrote: > Try the following code. > > ByteArrayOutputStream bao=new ByteArrayOutputStream(); > XMLSerializer s = new XMLSerializer(); > s.setOutputByteStream(bao); > s.serialize(fDocument); // fDocument is xml document > System.out.println(bao.toString());
I would suggest using a java.io.StringWriter instead. Then, once you've called serialize(), just perform a toString() on the StringWriter and you're done. -- Andy Clark * IBM, JTC - Silicon Valley * [EMAIL PROTECTED]
