code: public Map<String, FilterRuleChain<String>> parseChains(Element xmlElement) {
  
      Map<String, FilterRuleChain<String>> chainMap = new HashMap<>();
      NodeList childNodes = xmlElement.getChildNodes();
      for (int i = 0; i < childNodes.getLength(); i++) {
        Node child = childNodes.item(i);
        if (child.getNodeType() == Node.ELEMENT_NODE) {
          Element element = (Element) child;
          if (XML_TAG_CHAIN.equals(element.getTagName())) {
            String id = element.getAttribute(XML_ATR_CHAIN_ID);
            FilterRuleChain<String> parent = null;
            if (element.hasAttribute(XML_ATR_CHAIN_PARENT)) {
              String parentId = element.getAttribute(XML_ATR_CHAIN_PARENT);
              parent = chainMap.get(parentId);
              if (parent == null) {
                throw new IllegalArgumentException("Illegal parent (" + parentId + ") in chain (" + id
                    + "): parent chain has to be defined before being referenced!");
              }
            }
            FilterRuleChain<String> chain = parseChain(element, parent);
            FilterRuleChain<String> old = chainMap.put(id, chain);
            if (old != null) {
              throw new IllegalArgumentException("Duplicate chain id: " + id);
            }
          }
        }
      }
      return chainMap;
    }
docs: This method parses a map of {@link FilterRuleChain chain}s given by {@code xmlElement}.
  
  @param xmlElement is the XML element containing the filter-chains (see {@link #XML_TAG_CHAIN}) as children and puts
  them into a map with the {@link #XML_ATR_CHAIN_ID ID} as key. Unknown child elements or attributes are
  simply ignored.
  @return the map of all parsed chains.