@Override
    protected void readChild(XMLStreamReader in) throws XMLStreamException {
        String childName = in.getLocalName();
        if (Event.getXMLElementTagName().equals(childName)) {
            Event event = new Event(null, getSpecification());
            event.readFromXML(in);
            events.add(event);
        } else if ("scope".equals(childName)) {
            scopes.add(new Scope(in));
        } else if ("unit".equals(childName)) {
            // AbstractUnit closes element
            AbstractUnit unit = new AbstractUnit(in);
            if (units == null) {
                units = new ArrayList<AbstractUnit>();
            }
            units.add(unit);
        } else if ("upgrade".equals(childName)) {
            UnitType fromType = getSpecification()
                .getUnitType(in.getAttributeValue(null, "from-id"));
            UnitType toType = getSpecification()
                .getUnitType(in.getAttributeValue(null, "to-id"));
            if (fromType != null && toType != null) {
                if (upgrades == null) {
                    upgrades = new HashMap<UnitType, UnitType>();
                }
                upgrades.put(fromType, toType);
            }
            in.nextTag();
        } else {
            super.readChild(in);
        }
    }