NodeList conditionNodes = conditions.getElementsByTagName("condition"); int length = conditionNodes.getLength();
List conditionNodes = XMLUtil.getChildElements(conditions, "condition"); int length = conditionNodes.size();
    protected void init(Element restriction) {        // set up condition - OPTIONAL        Element conditions = XMLUtil.getChildElement(restriction, "conditions");        if (conditions != null) {            conditionType = conditions.getAttribute("type");            NodeList conditionNodes = conditions.getElementsByTagName("condition");            int length = conditionNodes.getLength();            for (int i = 0; i < length; i++) {                Element condition = (Element) conditionNodes.item(i);                ConditionDescriptor conditionDescriptor = new ConditionDescriptor(condition);                conditionDescriptor.setParent(this);                this.conditions.add(conditionDescriptor);            }        }    }