Yes it works.

But how to generate XML file and write tag into with XMLWriter ? 
With my code and toXML() method, that isn't work.

On Tuesday, April 9, 2019 at 8:46:18 PM UTC+2, pyth...@gmail.com wrote:
>
> Hi, 
> I have some problems to generate an XML file, the file is created but the 
> root tag is not written into the file when I call the writeXML(writer, 
> root) method;
>
> Here is the code :
>
> try{
>         //Element root
>         Element root = new Element("root");
>         String path = FileSystemStorage.getInstance().getAppHomePath();
>         XMLWriter xw = new XMLWriter(false);     
>         OutputStream os = 
> FileSystemStorage.getInstance().openOutputStream(path+""+"test.xml");    
>         OutputStreamWriter writer = new OutputStreamWriter(os);
>         xw.writeXML(writer, root); 
>         os.close();
>         writer.close();
>
> }catch(....){
>    .....
> }
>
> Any idea ? 
> Thank you.
>

-- 
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/d26a28d1-afba-4041-bc7a-a285c8f0cd86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to