public static final void writeLongArrayXml(long[] val,String name,XmlSerializer out) throws XmlPullParserException, IOException {
  if (val == null) {
    out.startTag(null,"null");
    out.endTag(null,"null");
    return;
  }
  out.startTag(null,"long-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",Long.toString(val[i]));
    out.endTag(null,"item");
  }
  out.endTag(null,"long-array");
}

public static final void writeLongArrayXml ( long [ ] val , String name , XmlSerializer out ) throws XmlPullParserException , IOException { if ( val == null ) { out . startTag ( null , "null" ) ; out . endTag ( null , "null" ) ; return ; } out . startTag ( null , "long-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" , Long . toString ( val [ i ] ) ) ; out . endTag ( null , "item" ) ; } out . endTag ( null , "long-array" ) ; }
flatten a long [ ] into an xmlserializer . the list can later be read back with readthislongarrayxml ( ) .
