Here you can find the source of writeIntArrayXml(int[] val, String name, XmlSerializer out)
public static final void writeIntArrayXml(int[] val, String name, XmlSerializer out) throws XmlPullParserException, java.io.IOException
//package com.java2s; import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlSerializer; public class Main { public static final void writeIntArrayXml(int[] val, String name, XmlSerializer out) throws XmlPullParserException, java.io.IOException { if (val == null) { out.startTag(null, "null"); out.endTag(null, "null"); return; }/*from ww w .j av a2 s.c om*/ out.startTag(null, "int-array"); if (name != null) { out.attribute(null, "name", name); } final int N = val.length; out.attribute(null, "num", Integer.toString(N)); for (int i = 0; i < N; i++) { out.startTag(null, "item"); out.attribute(null, "value", Integer.toString(val[i])); out.endTag(null, "item"); } out.endTag(null, "int-array"); } }