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 XMLWriter(false);    
        Log.p(xw.toXML(root));
    }
});

hi.show();


It printed out:
 <root />

-- 
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 [email protected].
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/1eda42ea-1fae-4461-829d-1999dc36b5b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to