* @param gId the id of the group whose contents are desired
	 * @return the contents of the group in XML
	 * @throws MVDException if the group was not found
	 */
	public String getContentsForGroup( int indent, short gId ) 
		throws MVDException
	{
		StringBuffer sb = new StringBuffer();
		// write group start tag
		for ( int i=0;i<indent;i++ )
			sb.append( " " );
		Group g1 = (gId != 0)?groups.get(gId-1):new Group((short)-1, 
			"top level" );
		if ( g1 == null )
			throw new MVDException("group id "+gId+" not found!");
		sb.append("<group name=\""+g1.name+"\" id=\""+gId+"\"");
		if ( gId != 0 )
			sb.append(" parent=\""+g1.parent+"\"");
		sb.append( ">\n" );
		// check for sub-groups
		for ( short i=0;i<groups.size();i++ )
		{
			Group g = groups.get( i );
			if ( g.parent == gId )
				sb.append( getContentsForGroup(indent+2,
					(short)(i+1)) );
		}
		// get sub-versions
		for ( short i=0;i<versions.size();i++ )
		{
			Version v = versions.get( i );
			if ( v.group == gId )
				sb.append( v.toXML(indent+2,i+1) );
		}
		// write group end tag
		for ( int i=0;i<indent;i++ )
			sb.append( " " );
		sb.append("</group>");
		sb.append("\n");
		return sb.toString();
	}