private void generate(SubscriptionAttributes attrs) throws SAXException {
    if (attrs == null) {
      return;
    }

    String interestString;
    InterestPolicy ip = attrs.getInterestPolicy();
    AttributesImpl atts = new AttributesImpl();

    if (ip.isAll()) {
      interestString = ALL;
    } else if (ip.isCacheContent()) {
      interestString = CACHE_CONTENT;
    } else {
      throw new InternalGemFireException(
          String.format("Unknown InterestPolicy: %s", ip));
    }

    atts.addAttribute("", "", INTEREST_POLICY, "", interestString);

    handler.startElement("", SUBSCRIPTION_ATTRIBUTES, SUBSCRIPTION_ATTRIBUTES, atts);
    handler.endElement("", SUBSCRIPTION_ATTRIBUTES, SUBSCRIPTION_ATTRIBUTES);
  }
Generates XML for <code>SubscriptionAttributes</code>
geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlGenerator.java