code: private static void parseList(XmlPullParser parser, Privacy privacy) throws XmlPullParserException, IOException {
          boolean done = false;
          String listName = parser.getAttributeValue("", "name");
          ArrayList<PrivacyItem> items = new ArrayList<>();
          while (!done) {
              int eventType = parser.next();
              if (eventType == XmlPullParser.START_TAG) {
                  if (parser.getName().equals("item")) {
                      // CHECKSTYLE:OFF
                      items.add(parseItem(parser));
                      // CHECKSTYLE:ON
                  }
              }
              else if (eventType == XmlPullParser.END_TAG) {
                  if (parser.getName().equals("list")) {
                      done = true;
                  }
              }
          }
  
          privacy.setPrivacyList(listName, items);
      // CHECKSTYLE:OFF
      }
docs: Parse the list complex type