@Override
    public Map<? extends Savable, ? extends Savable> readSavableMap(String name, Map<? extends Savable, ? extends Savable> defVal) throws IOException {
        Element mapElement = findChildElement(name);

        if (mapElement == null) {
            return defVal;
        }

        Map<Savable, Savable> ret = new HashMap<Savable, Savable>();

        NodeList nodes = mapElement.getChildNodes();
        for (int i = 0; i < nodes.getLength(); i++) {
            Node n = nodes.item(i);
            if (n instanceof Element && n.getNodeName().equals("MapEntry")) {
                Element elem = (Element) n;
                currentElement = elem;
                Savable key = readSavable(XMLExporter.ELEMENT_KEY, null);
                Savable val = readSavable(XMLExporter.ELEMENT_VALUE, null);
                ret.put(key, val);
            }
        }

        currentElement = (Element) mapElement.getParentNode();

        return ret;
    }
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