i've been wondering why must to use the XMLSerializer.serialize when i use DOM to generate the output as String please..help
-----Original Message----- From: Voytenko, Dimitry [mailto:[EMAIL PROTECTED] Sent: Friday, November 16, 2001 4:14 PM To: '[EMAIL PROTECTED]' Subject: RE: Using GZipOutputStream with XMLSerializer Hi Salim, I used almost similar code many times and everything was OK. The only difference: I used SAX interfaces, instead of serializing DOM with XMLSerializer.serialize(Element). But it shouldn't make a difference. If below is your exact code, I think you just need to close the stream in the end, at least it defenetely should be done to avoid data loss. Thanks, Dmitry -----Original Message----- From: Salim Erradey [mailto:[EMAIL PROTECTED] Sent: Friday, November 16, 2001 13:23 To: [EMAIL PROTECTED] Subject: Using GZipOutputStream with XMLSerializer Hi, I have an issue with the size of XML files my application is generating, so I decided to write to a compressed file. I have tried using the GZipOutputStream with the org.apache.xml.serialize.XMLSerializer: GZIPOutputStream gzipOS = new GZIPOutputStream(new FileOutputStream(new File("xml.gz"))); XMLSerializer xmlSerializer = new XMLSerializer(gzipOS, outputFormat); xmlSerializer.asDOMSerializer(); xmlSerializer.serialize(document.getDocumentElement()); } I am getting an empty file with this. Do you know if it is possible ?, Has anyone tried this before ?. Feedback is greatly appreciated. Best Regards, Salim Erradey e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
