In this question, the first answer explains a way of defining components of a gaming engine in XML, like this:
<?xml version="1.0" encoding="UTF-8"?>
<mobs>
<mob>
<personality>Aggressive</personality>
<intelligence>20</intelligence>
</mob>
</mobs>
Then, states in Java that your mob class would look like this:
public class Mob {
private IPersonality personality;
private Integer intelligence
//** Getters & Setters **//
}
What exactly is the XML doing, here? I'm not really familiar with XML, at all.
So you don't have to write all the code to do read and write on each individual property of the class to and from the XML file.
– Thraka Aug 02 '12 at 15:48