public void setAtts(final Attributes atts) {
            clear();

            for (int i = 0; i < atts.getLength(); i++) {
                final String value = atts.getValue(i);
                final String safeValue = safeBuffer.makeSafe(value);
                addAttribute(atts.getURI(i), atts.getLocalName(i), atts.getQName(i), atts.getType(i), safeValue);
                safeBuffer.clear();
            }
        }
Encode a code point and add it to the safe buffer.
stroom-pipeline/src/main/java/stroom/pipeline/filter/SafeXMLFilter.java