"</list> " + this.xml.comment( U.q( this._fixXmlAttribute(f.getName() ) ) )
"</list> " + this.xml.comment( U.q( XmlUtils.xmlE( f.getName() ) ) )
  private void _writeList(Group g, Field f)     throws  CompositeNotFoundException,            GroupNotFoundException,            IOException,            MemberNotFoundException,            SchemaException,            SubjectNotFoundException  {    // TODO 20061005 refactor: this is ugly    if (g.canReadField(f)) {      boolean isComposite = false;      Set     membersSet  = null;      if (f.getName().equals("members") && g.hasComposite()) {        isComposite = true;        membersSet  = new HashSet();      }       else {        membersSet = g.getImmediateMemberships(f);      }      Collection members = new ArrayList();      members.addAll(membersSet);      if (        ( f.getName().equals("members")   && !this._isGroupMemberImmediateOnlyExportEnabled() )        ||         ( !f.getName().equals("members")  && !this._isGroupListImmediateOnlyExportEnabled() )      )      {        members.addAll( g.getEffectiveMemberships(f) );        if (f.getName().equals("members") && g.hasComposite()) {          members.addAll( g.getCompositeMemberships() );        }      }      if (members.isEmpty() && !isComposite) {        return;      }      this.xml.indent();      this.xml.puts(          "<list field="  + U.q( this._fixXmlAttribute(f.getName()) )        + " groupType="   + U.q( this._fixXmlAttribute(f.getGroupType().getName()) )        + ">"      );      if (isComposite) {        this._writeComposite( CompositeFinder.findAsOwner(g) );      }      this._writeMembers(members, g, f);      this.xml.puts(        "</list> " + this.xml.comment( U.q( this._fixXmlAttribute(f.getName() ) ) )       );      this.xml.undent();      this.xml.puts();    }  } // private void _writeListField(g, f)