Hi,
I am new user of dom4j.
I found using XMLWriter to save GB2312 code to XML file results some non-readable code.
Is it a bug?
This is code:
----
File saveFile =
new File(fileName);OutputFormat outFormat = new OutputFormat(" ", false, "GB2312");
XMLWriter xmlWriter =
new XMLWriter(new FileWriter(saveFile), outFormat);
xmlWriter.write(dom2File);
xmlWriter.flush();
---
Instead if I am using XSL translation to save to XML file. The result is fine.
---------
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer();
StringWriter strWriter = new StringWriter();
DocumentSource source = new DocumentSource (testDom);
StreamResult result = new StreamResult(saveFile);
transformer.transform(source, result);
--------
Is there anybody can help me out?
Thanks
Ken
Help STOP SPAM with the new MSN 8 and get 2 months FREE* ------------------------------------------------------- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user