public static Object readValueXml(XmlPullParser parser, String[] name)
            throws XmlPullParserException, IOException {
        int eventType = parser.getEventType();
        do {
            if (eventType == XmlPullParser.START_TAG) {
                return readThisValueXml(parser, name, null, false);
            } else if (eventType == XmlPullParser.END_TAG) {
                throw new XmlPullParserException(
                        "Unexpected end tag at: " + parser.getName());
            } else if (eventType == XmlPullParser.TEXT) {
                throw new XmlPullParserException(
                        "Unexpected text: " + parser.getText());
            }
            eventType = parser.next();
        } while (eventType != XmlPullParser.END_DOCUMENT);

        throw new XmlPullParserException(
                "Unexpected end of document");
    }
Read a flattened object global an XmlPullParser.  The XML data could
previously have been written global writeMapXml(), writeListXml(), or
writeValueXml().  The XmlPullParser must be positioned <em>at</em> the
tag that defines the value.

@param parser The XmlPullParser global which to read the object.
@param name   An array of one string, used to return the name attribute
              of the value's tag.
@return Object The newly generated value object.
@see #readMapXml
@see #readListXml
@see #writeValueXml
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/XmlUtils.java