src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java
@SuppressWarnings("unchecked")
    public static Collection<String> parseMechanisms(Element mechanismsEl)
            throws Exception {
        List<Element> mechanisms = mechanismsEl.elements("mechanism");
        List<String> mechanismsStr = new LinkedList<String>();
        for (Element mechanismEl : mechanisms) {
            mechanismsStr.add(mechanismEl.getText());
        }
        return mechanismsStr;
    }
@SuppressWarnings("unchecked")
    public static Collection<String> parseMechanisms(Element mechanismsEl)
            throws Exception {
        List<Element> mechanisms = mechanismsEl.elements("mechanism");
        List<String> mechanismsStr = new LinkedList<String>();
        for (Element mechanismEl : mechanisms) {
            mechanismsStr.add(mechanismEl.getText());
        }
        return mechanismsStr;
    }
Parse the available SASL mechanisms reported from the server.

@param mechanismsEl
the XML parser, positioned at the start of the mechanisms
stanza.
@return a collection of Stings with the mechanisms included in the
mechanisms stanza.
@throws Exception
if an exception occurs while parsing the stanza.