Try this:
try(OutputStream os =
FileSystemStorage.getInstance().openOutputStream(path+""+"test.xml");
OutputStreamWriter writer = new OutputStreamWriter(os)) {
xw.writeXML(writer, root);
writer.close();
}
Yes, I want to create an XML file and save it to the phone. For the moment,
it is saved in the .cn/ repertory of my PC and when I open it for check, it
is empty and no tag is there
On Thursday, April 11, 2019 at 4:14:09 AM UTC+2, Shai Almog wrote:
>
> Both methods lead to the same block:
>
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
I just tried this:
Form hi = new Form("XML", BoxLayout.y());
Button write = new Button("Write");
hi.add(write);
write.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
Element root = new Element("root");
XMLWriter xw = new