0

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));
            e.close();

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

2
Contributors
1
Reply
3
Views
5 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.