@Override
    public void write(boolean value, String name, boolean defVal) throws IOException {
        if (value != defVal) {
            XMLUtils.setAttribute(currentElement, name, String.valueOf(value));
        }
    }
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