public static void writeElement(final XMLStreamWriter writer,final String elementName,final String[] value) throws XMLStreamException {
  if (value == null || value.length == 0) {
    return;
  }
  writer.writeStartElement(elementName);
  for (int i=0; i < value.length; i++) {
    writer.writeStartElement("string");
    writer.writeCharacters(value[i]);
    writer.writeEndElement();
  }
  writer.writeEndElement();
}

public static void writeElement ( final XMLStreamWriter writer , final String elementName , final String [ ] value ) throws XMLStreamException { if ( value == null || value . length == 0 ) { return ; } writer . writeStartElement ( elementName ) ; for ( int i = 0 ; i < value . length ; i ++ ) { writer . writeStartElement ( "string" ) ; writer . writeCharacters ( value [ i ] ) ; writer . writeEndElement ( ) ; } writer . writeEndElement ( ) ; }
writes an element with the given name for each value in the given array .
