@Override
    public Savable[][] readSavableArray2D(String name, Savable[][] defVal) throws IOException {
        Element outerArrayElement = findChildElement(name);

        if (outerArrayElement == null || !outerArrayElement.hasAttributes()) {
            return defVal;
        }

        List<Element> innerArrayElements = getObjectArrayElements(outerArrayElement);

        Savable[][] savableArray2D = new Savable[innerArrayElements.size()][];

        Element old = currentElement;

        for (int i = 0; i < innerArrayElements.size(); i++) {
            List<Element> savableElements = getObjectArrayElements(innerArrayElements.get(i));

            if (savableElements == null) {
                continue;
            }

            savableArray2D[i] = new Savable[savableElements.size()];
            for (int j = 0; j < savableElements.size(); j++) {
                currentElement = savableElements.get(j);
                savableArray2D[i][j] = readSavableFromCurrentElement(null);
            }
        }

        currentElement = old;

        return savableArray2D;
    }
Part of the jME XML IO system as introduced in the Google Code jmexml project.

@author Kai Rabien (hevee) - original author of the code.google.com jmexml project
@author Doug Daniels (dougnukem) - adjustments for jME 2.0 and Java 1.5
@author blaine
jme3-plugins/src/xml/java/com/jme3/export/xml/DOMInputCapsule.java