code: protected List<CmsResource> getSitemapSubEntryResources(String rootPath) throws CmsException {
  
          CmsObject rootCms = OpenCms.initCmsObject(getCmsObject());
          List<CmsResource> result = new ArrayList<CmsResource>();
          rootCms.getRequestContext().setSiteRoot("");
          CmsJspNavBuilder navBuilder = new CmsJspNavBuilder(rootCms);
          for (CmsJspNavElement navElement : navBuilder.getNavigationForFolder(
              rootPath,
              Visibility.all,
              CmsResourceFilter.ONLY_VISIBLE)) {
              if ((navElement != null) && navElement.isInNavigation()) {
                  result.add(navElement.getResource());
              }
          }
          return result;
      }
docs: Gets the sitemap sub entries for a given path as resources.<p>
  
  @param rootPath the root path
  @return the sitemap sub entry resources
  @throws CmsException if something goes wrong