code: public static boolean isXmlContent(CmsResource resource) {
  
          boolean result = false;
          if (resource != null) {
              // avoid array index out of bound exception:
              if (!resource.isFolder()) {
                  result = OpenCms.getResourceManager().getResourceType(resource) instanceof CmsResourceTypeXmlContent;
              }
          }
          return result;
      }
docs: Returns <code>true</code> in case the given resource is an XML content.<p>
  
  @param resource the resource to check
  
  @return <code>true</code> in case the given resource is an XML content
  
  @since 7.0.2