@Override
    public void writeSavableArrayList(ArrayList value, String name, ArrayList defVal) throws IOException {
        if (value == null || value.equals(defVal)) {
            return;
        }

        Savable[] savableArray = new Savable[value.size()];
        for (int i = 0; i < value.size(); i++) {
            Object o = value.get(i);

            if (o != null && !(o instanceof Savable)) {
                throw new IOException(new ClassCastException("Not a Savable instance: " + o));
            }

            savableArray[i] = (Savable) o;
        }

        write(savableArray, name, null);
    }
appends a new Element with the given name to currentElement, sets
currentElement to be new Element, and returns the new Element as well
jme3-plugins/src/xml/java/com/jme3/export/xml/DOMOutputCapsule.java