public static void generate(Cache cache, PrintWriter pw, boolean useSchema, String version) {
    new CacheXmlGenerator(cache, useSchema, version, true).generate(pw);
  }
Examines the given <code>Cache</code> and from it generates XML data that is written to the
given <code>PrintWriter</code>. The schema/dtd for the current version of GemFire is used.

@param useSchema Should the generated XML reference a schema (as opposed to a DTD)? For
       versions 8.1 or newer this should be true, otherwise false.
@param version The version of GemFire whose DTD/schema should be used in the generated XML. See
       {@link #VERSION_4_0}.

@since GemFire 4.0
geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlGenerator.java