protected void writeAttributes(Attributes attributes) throws IOException {
        for (int i = 0, size = attributes.getLength(); i < size; i++) {
            writeAttribute( attributes, i );
        }
    }
Writes the attributes of the given element
@param element the element whose attributes should be written
@throws IOException if the element could not be written
xmppserver/src/main/java/org/jivesoftware/util/XMLWriter.java