@Override
    public void startPrefixMapping(String prefix, String uri) throws SAXException {
        if ( namespacesMap == null ) {
            namespacesMap = new HashMap<>();
        }
        namespacesMap.put(prefix, uri);
        super.startPrefixMapping(prefix, uri);
    }
<p>Writes the closing tag of an {@link Element}</p>

@param element <code>Element</code> to output.
@throws IOException if the element could not be written
xmppserver/src/main/java/org/jivesoftware/util/XMLWriter.java