question: public static final void writeStringArrayXml ( String [ ] val , String name , XmlSerializer out ) throws XmlPullParserException , java . io . IOException { if ( val == null ) { out . startTag ( null , "null" ) ; out . endTag ( null , "null" ) ; return ; } out . startTag ( null , "string-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 ++ ) { if ( val [ i ] == null ) { out . startTag ( null , "null" ) ; out . endTag ( null , "null" ) ; } else { out . startTag ( null , "item" ) ; out . attribute ( null , "value" , val [ i ] ) ; out . endTag ( null , "item" ) ; } } out . endTag ( null , "string-array" ) ; }
target:  Flatten a String[] into an XmlSerializer.  The list can later be read back with readThisStringArrayXml().