Dear all,
I would like to ask you something that I have absolutely no idea how to do? I am actually writing my own XML de/serializer in Java. Given an object like the following:
Quote:
class person
{
public String name;
public int age;
}
|
and given the following XML file:
Quote:
<person>
<name>David</name>
<age>27</age>
</person>
|
the deserializer for instance can execute the following set of instructions in order to create the object:
Quote:
Person person = new Person();
person.name = "David";
person.age = 27;
|
I am now wondering how can I assign attribute values when they are declared as private? Does anybody know how traditional de/serializer work in such cases?
Thank you.