code: public static void writeElementList(XMLOutput xmlOutput, String tagName, Iterator<String> listValueIterator)
              throws IOException {
          while (listValueIterator.hasNext()) {
              xmlOutput.openTag(tagName);
              xmlOutput.writeText(listValueIterator.next());
              xmlOutput.closeTag(tagName);
          }
      }
docs: Write a list of Strings to document as elements with given tag name.
  
  @param xmlOutput
  the XMLOutput object to write to
  @param tagName
  the tag name
  @param listValueIterator
  Iterator over String values to write