Try this: 

                try(OutputStream os = 
FileSystemStorage.getInstance().openOutputStream(path+""+"test.xml");  
OutputStreamWriter writer = new OutputStreamWriter(os)) {
                    xw.writeXML(writer, root);
                    writer.close();
                } catch(IOException err) {
                    Log.e(err);
                }

It looks like your code closes the output stream instead of the writer. 
This can discard unflushed bytes.

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/3536d5f9-83b2-407d-b8aa-d5cc41f9b812%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to