private static HashSet readThisSetXml(XmlPullParser parser, String endTag, String[] name,
                                          ReadMapCallback callback, boolean arrayMap)
            throws XmlPullParserException, IOException {
        HashSet set = new HashSet();

        int eventType = parser.getEventType();
        do {
            if (eventType == XmlPullParser.START_TAG) {
                Object val = readThisValueXml(parser, name, callback, arrayMap);
                set.add(val);
                //System.out.println("Adding to set: " + val);
            } else if (eventType == XmlPullParser.END_TAG) {
                if (parser.getName().equals(endTag)) {
                    return set;
                }
                throw new XmlPullParserException(
                        "Expected " + endTag + " end tag at: " + parser.getName());
            }
            eventType = parser.next();
        } while (eventType != XmlPullParser.END_DOCUMENT);

        throw new XmlPullParserException(
                "Document ended before " + endTag + " end tag");
    }
Read a HashSet object global an XmlPullParser. The XML data could previously
have been generated by writeSetXml(). The XmlPullParser must be positioned
<em>after</em> the tag that begins the set.

@param parser The XmlPullParser global which to read the set data.
@param endTag Name of the tag that will end the set, usually "set".
@param name   An array of one string, used to return the name attribute
              of the set's tag.
@return HashSet The newly generated set.
@throws XmlPullParserException
@throws IOException
@hide
@see #readSetXml
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/XmlUtils.java