Search in sources :

Example 1 with Iterable

use of org.xmlpull.v1.builder.Iterable in project airavata by apache.

the class GFacRegistryClient method findArrayValue.

private static ArrayList<String> findArrayValue(String name, WSIFMessageElement response) {
    XmlElement param = response.element(null, name);
    if (param != null) {
        Iterable it = param.elements(null, "value");
        if (it != null) {
            ArrayList<String> values = new ArrayList<String>();
            Iterator arrayValues = it.iterator();
            while (arrayValues.hasNext()) {
                values.add(((XmlElement) arrayValues.next()).requiredTextContent());
            }
            return values;
        }
    }
    return null;
}
Also used : Iterable(org.xmlpull.v1.builder.Iterable) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) XmlElement(org.xmlpull.v1.builder.XmlElement)

Aggregations

ArrayList (java.util.ArrayList)1 Iterator (java.util.Iterator)1 Iterable (org.xmlpull.v1.builder.Iterable)1 XmlElement (org.xmlpull.v1.builder.XmlElement)1