private void generate(PartitionListener pl) throws SAXException {
    if (pl == null) {
      return;
    }

    handler.startElement("", CacheXml.PARTITION_LISTENER, CacheXml.PARTITION_LISTENER, EMPTY);

    String className = pl.getClass().getName();

    handler.startElement("", CLASS_NAME, CLASS_NAME, EMPTY);
    handler.characters(className.toCharArray(), 0, className.length());
    handler.endElement("", CLASS_NAME, CLASS_NAME);
    Properties props;
    if (pl instanceof Declarable2) {
      props = ((Declarable2) pl).getConfig();
      generate(props, null);
    }
    handler.endElement("", CacheXml.PARTITION_LISTENER, CacheXml.PARTITION_LISTENER);
  }
Generate XML for partition-listener element in PartitionedRegion Attributes
geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlGenerator.java