for (Iterator iter = rs.iterator (); iter.hasNext (); ) { TimeSpan elem = (TimeSpan) iter.next (); Element value = createValue (doc); listTag.appendChild (value); value.appendChild (createLittleInterval (doc, new Date (elem.getStartTime ()), new Date (elem.getEndTime   ())));
if (!rs.isEmpty ()) { for (Iterator iter = rs.iterator (); iter.hasNext (); ) { TimeSpan elem = (TimeSpan) iter.next (); Element value = createValue (doc); listTag.appendChild (value); value.appendChild (createLittleInterval (doc, new Date (elem.getStartTime ()), new Date (elem.getEndTime   ()))); }
  protected Element createInterval (Document doc,									RoleSchedule rs) {    Element fieldElem = doc.createElement("FIELD");	fieldElem.setAttribute ("name", "scheduleElements");    Element listTag = createList (doc);	fieldElem.appendChild (listTag);	for (Iterator iter = rs.iterator (); iter.hasNext (); ) {	  TimeSpan elem = (TimeSpan) iter.next ();	  Element value = createValue (doc);	  listTag.appendChild (value);	  value.appendChild (createLittleInterval (doc, 											   new Date (elem.getStartTime ()),											   new Date (elem.getEndTime   ())));	}	return fieldElem;  }