code: protected
    Appender findAppenderByName(Document doc, String appenderName)  {      
      Appender appender = (Appender) appenderBag.get(appenderName);
  
      if(appender != null) {
        return appender;
      } else {
        // Doesn't work on DOM Level 1 :
        // Element element = doc.getElementById(appenderName);
                          
        // Endre's hack:
        Element element = null;
        NodeList list = doc.getElementsByTagName("appender");
        for (int t=0; t < list.getLength(); t++) {
  	Node node = list.item(t);
  	NamedNodeMap map= node.getAttributes();
  	Node attrNode = map.getNamedItem("name");
  	if (appenderName.equals(attrNode.getNodeValue())) {
  	  element = (Element) node;
  	  break;
  	}
        }
        // Hack finished.
  
        if(element == null) {
  	LogLog.error("No appender named ["+appenderName+"] could be found."); 
  	return null;
        } else {
  	    appender = parseAppender(element);
          if (appender != null) {
              appenderBag.put(appenderName, appender);
          }
          return appender;
        }
      } 
    }
docs: Used internally to parse appenders by IDREF name.