Hi !
I'm devloping a Personal Trainer app on android and I need to remember training results in a history. I decided to remeber this results in a XML file.

WHAT I HAVE: is an User class with results

class User{

String name;
int result1;
int result2;

User(String name, int result1, int result2)
        this.name = name;
        this.reuslt1 = result1;
        this.result1 = result2;

WAHAT I NEED: is an XMLEndoer.
Eariler a used this code but it doesnt supports andoid:

XMLEncoder e = new XMLEncoder(
                new BufferedOutputStream(
                    new FileOutputStream("Test.xml")));
            e.writeObject(new User("Tom",10,15));

Please, if you know any classes what i can use to make such an xml file please share. Very helpfull would be also an example how to use it.

Thanks for any help.

Edited by hatebin

6 Years
Discussion Span
Last Post by peter_budo
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.