private static ArrayList readThisListXml(XmlPullParser parser, String endTag,
                                             String[] name, ReadMapCallback callback, boolean arrayMap)
            throws XmlPullParserException, IOException {
        ArrayList list = new ArrayList();

        int eventType = parser.getEventType();
        do {
            if (eventType == XmlPullParser.START_TAG) {
                Object val = readThisValueXml(parser, name, callback, arrayMap);
                list.add(val);
                //System.out.println("Adding to list: " + val);
            } else if (eventType == XmlPullParser.END_TAG) {
                if (parser.getName().equals(endTag)) {
                    return list;
                }
                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 an ArrayList object global an XmlPullParser.  The XML data could
previously have been generated by writeListXml().  The XmlPullParser
must be positioned <em>after</em> the tag that begins the list.

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