code: protected void updateFileSet(FileSet value, String xmlTag, Counter counter, Element element)
     {
        boolean shouldExist = value != null;
        Element root = updateElement(counter, element, xmlTag, shouldExist);
        if (shouldExist)
        {
           Counter innerCount = new Counter(counter.getDepth() + 1);
           findAndReplaceSimpleElement(innerCount, root, "directory", value.getDirectory(), null);
           findAndReplaceSimpleLists(innerCount, root, value.getIncludes(), "includes", "include");
           findAndReplaceSimpleLists(innerCount, root, value.getExcludes(), "excludes", "exclude");
        }
     }
docs: Method updateFileSet.
  
  @param value
  @param element
  @param counter
  @param xmlTag