String xml = currentCommunityXML;
String xml = getXMLOfCommunity(totalList, showcommunity);
    private void showAgentAttributes(String format, String agent)    {      //String xml = getXMLOfCommunity(totalList, showcommunity);      String xml = currentCommunityXML;      if(format.equals("xml"))        showXML(xml);      else      {        int index = xml.indexOf("<agent name=\"" + agent + "\">");        int end = xml.indexOf("</agent>", index);        String str = xml.substring(index, end + 8);        String html = getHTMLFromXML(str, "agentAttributes.xsl");        out.print(html);      }    }