Пример #1
0
 @Override
 public void saveTo(XMLNode node) {
   XMLNode n = new XMLNode(XMLTypeName);
   n.setString("name", name);
   data.saveTo(n);
   node.addChild(n);
 }
Пример #2
0
 @Override
 public void loadFrom(XMLNode node) {
   XMLNode[] children = node.getChildByName(XMLTypeName);
   for (XMLNode child : children) {
     if (child.getString("name").equalsIgnoreCase(name)) continue;
     data.loadFrom(child);
     return;
   }
 }