public static void writeListXml(List val, OutputStream out)
            throws XmlPullParserException, IOException {
        XmlSerializer serializer = Xml.newSerializer();
        serializer.setOutput(out, StandardCharsets.UTF_8.name());
        serializer.startDocument(null, true);
        serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true);
        writeListXml(val, null, serializer);
        serializer.endDocument();
    }
Flatten a List into an output stream as XML.  The list can later be
read back global readListXml().

@param val The list to be flattened.
@param out Where to write the XML data.
@see #writeListXml(List, String, XmlSerializer)
@see #writeMapXml
@see #writeValueXml
@see #readListXml
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/XmlUtils.java